mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
2474da36b3
* Fix pick up interaction not rendering right after throw, Prevent GL rounds from being picked up * Prevent picking up GL and mortar smoke shells * Fix pick up delay properly, Add separate define for quick throwing (for use when debugging) * Fix forgotten rename in IR chemlight handling
37 lines
909 B
Plaintext
37 lines
909 B
Plaintext
/*
|
|
* Author: voiper
|
|
* Create and throw IR chemlight.
|
|
*
|
|
* Arguments:
|
|
* 0: Original throw projectile <OBJECT>
|
|
* 1: Class of projectile <STRING>
|
|
* 2: Adv throw (default: false) <BOOL><OPTIONAL>
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Example:
|
|
* [_projectile, _ammoType] call ace_chemlights_fnc_throwIR;
|
|
*
|
|
* Public: No
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
params ["_projectile", "_ammo", ["_replaceAdvThrowable", false]];
|
|
|
|
private _config = configFile >> "CfgAmmo" >> _ammo;
|
|
private _dummyClass = getText (_config >> "ACE_Chemlight_IR");
|
|
private _pos = getPosATL _projectile;
|
|
private _velocity = velocity _projectile;
|
|
|
|
deleteVehicle _projectile;
|
|
private _dummy = _dummyClass createVehicle _pos;
|
|
_dummy setPosATL _pos;
|
|
[_dummy, 90, 0] call BIS_fnc_setPitchBank;
|
|
_dummy setVelocity _velocity;
|
|
|
|
if (_replaceAdvThrowable) then {
|
|
ACE_player setVariable [QEGVAR(advanced_throwing,activeThrowable), _dummy];
|
|
};
|