mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Ensured actual fuse time is used instead of simply 1.
This commit is contained in:
parent
8c83320675
commit
00643c3c83
@ -43,7 +43,7 @@ while {!_codeSet} do {
|
||||
if (isNil QGVAR(CellphoneIEDs)) then {
|
||||
GVAR(CellphoneIEDs) = [];
|
||||
};
|
||||
_count = GVAR(CellphoneIEDs) pushBack [_explosive,_code];
|
||||
_count = GVAR(CellphoneIEDs) pushBack [_explosive,_code,GetNumber(ConfigFile >> "CfgMagazines" >> _magazineClass >> "ACE_Triggers" >> "Cellphone" >> "FuseTime")];
|
||||
_count = _count + 1;
|
||||
publicVariable QGVAR(CellphoneIEDs);
|
||||
_unit sideChat format ["IED %1 code: %2", _count,_code];
|
||||
|
@ -22,12 +22,14 @@ if ((_i mod 4) == 0) then {
|
||||
playSound3D [QUOTE(PATHTOF_R(Data\Audio\DialTone.wss)), objNull, false, (_unit ModelToWorld [0,0.2,2]), 15,1,2.5];
|
||||
};
|
||||
ctrlSetText [1400,format["Calling%1",_arr select (_i - 4)]];
|
||||
if (_i >= (count _arr + 2)) then {
|
||||
[_this select 1] call CALLSTACK(cba_fnc_removePerFrameHandler);
|
||||
|
||||
private "_explosive";
|
||||
_explosive = [_unit, _code] call FUNC(getSpeedDialExplosive);
|
||||
|
||||
if (_i >= (count _arr + 2)) then {
|
||||
[_this select 1] call CALLSTACK(cba_fnc_removePerFrameHandler);
|
||||
if (!isNull (_explosive)) then {
|
||||
[_unit, -1, [_explosive, 1]] call FUNC(detonateExplosive);
|
||||
[_unit, -1, [_explosive select 0, _explosive select 2]] call FUNC(detonateExplosive);
|
||||
};
|
||||
_unit setVariable [QGVAR(Dialing), false, true];
|
||||
if (_unit == ace_player) then {
|
||||
@ -35,10 +37,8 @@ if (_i >= (count _arr + 2)) then {
|
||||
};
|
||||
};
|
||||
if (_i == (count _arr)) then {
|
||||
private "_explosive";
|
||||
_explosive = [_unit, _code] call FUNC(getSpeedDialExplosive);
|
||||
if (!isNull (_explosive)) then {
|
||||
playSound3D [QUOTE(PATHTOF_R(Data\Audio\Cellphone_Ring.wss)),objNull, false, getPosATL _explosive,3.16228,1,75];
|
||||
playSound3D [QUOTE(PATHTOF_R(Data\Audio\Cellphone_Ring.wss)),objNull, false, getPosATL (_explosive select 0),3.16228,1,75];
|
||||
};
|
||||
};
|
||||
(_this select 0) set [1, _i + 1];
|
||||
|
@ -21,7 +21,7 @@ if (isNil QGVAR(CellphoneIEDs)) exitWith {objNull};
|
||||
_explosive = objNull;
|
||||
{
|
||||
if ((_x select 1) == _code) exitWith {
|
||||
_explosive = _x select 0;
|
||||
_explosive = _x;
|
||||
};
|
||||
false
|
||||
} count GVAR(CellphoneIEDs);
|
||||
|
Loading…
Reference in New Issue
Block a user