|
@@ -1,10 +1,10 @@
|
|
|
params[["_ammo", ""], ["_position", [0,0,0]], ["_direction", 0]];
|
|
|
|
|
|
-diag_log format["Deploying Squad Shield for %1 at %2", _ammo, _position];
|
|
|
+diag_log format["[RD501][Fired Deployable][Deploy Server] Deploying Squad Shield for %1 at %2", _ammo, _position];
|
|
|
|
|
|
private _config = configFile >> "CfgAmmo" >> _ammo;
|
|
|
if!(isClass _config) exitWith {
|
|
|
- diag_log format["Unable to find class '%1' in CfgAmmo", _ammo];
|
|
|
+ diag_log format["[RD501][Fired Deployable][Deploy Server] Unable to find class '%1' in CfgAmmo", _ammo];
|
|
|
};
|
|
|
|
|
|
private _isValid = getNumber (_config >> "rd501_fired_deployable") == 1;
|
|
@@ -12,14 +12,20 @@ private _deployable = getText (_config >> "rd501_fired_deployable_object");
|
|
|
private _timeToLive = getNumber (_config >> "rd501_fired_deployable_timeToLive");
|
|
|
|
|
|
if(!_isValid) exitWith {
|
|
|
- diag_log format["Requested throw type '%1' is does not contain rd501_fired_deployable=1", _ammo];
|
|
|
+ diag_log format["[RD501][Fired Deployable][Deploy Server] Requested throw type '%1' is does not contain rd501_fired_deployable=1", _ammo];
|
|
|
};
|
|
|
|
|
|
if(isNil "_deployable" || _deployable isEqualTo "") exitWith {
|
|
|
- diag_log format["Failed to find rd501_fired_deployable_object defined in ammo type %1", _ammo];
|
|
|
+ diag_log format["[RD501][Fired Deployable][Deploy Server] Failed to find rd501_fired_deployable_object defined in ammo type %1", _ammo];
|
|
|
};
|
|
|
|
|
|
_config = configFile >> "CfgVehicles" >> _deployable;
|
|
|
+
|
|
|
+private _setInvincible = 0;
|
|
|
+if(isNumber(_config >> "rd501_fired_deployable_ignoreDamage")) then {
|
|
|
+ _setInvincible = getNumber (_config >> "rd501_fired_deployable_ignoreDamage");
|
|
|
+};
|
|
|
+
|
|
|
private _hasLoopSound = isText (_config >> "rd501_fired_deployable_loopSound");
|
|
|
private _loopSound = getText (_config >> "rd501_fired_deployable_loopSound");
|
|
|
private _loopDuration = getNumber (_config >> "rd501_fired_deployable_loopDuration");
|
|
@@ -32,6 +38,10 @@ private _deployed = createVehicle [_deployable, _position, [], 0, "CAN_COLLIDE"]
|
|
|
_deployed setPosATL _position;
|
|
|
_deployed setDir _direction;
|
|
|
|
|
|
+if(_setInvincible == 1) then {
|
|
|
+ _deployed allowDamage false;
|
|
|
+};
|
|
|
+
|
|
|
if(_timeToLive > 0) then {
|
|
|
[
|
|
|
{
|