diff --git a/addons/explosives/functions/fnc_dialPhone.sqf b/addons/explosives/functions/fnc_dialPhone.sqf index f694ff3d5f..58d3dab716 100644 --- a/addons/explosives/functions/fnc_dialPhone.sqf +++ b/addons/explosives/functions/fnc_dialPhone.sqf @@ -34,9 +34,9 @@ if (_unit == ace_player) then { _explosive = [_unit, _code] call FUNC(getSpeedDialExplosive); if (!isNull (_explosive)) then { [{ - playSound3D [QUOTE(PATHTOF_R(Data\Audio\Cellphone_Ring.wss)),objNull, false, getPosATL (_this select 1),3.16228,1,75]; + playSound3D [QUOTE(PATHTOF_R(Data\Audio\Cellphone_Ring.wss)),objNull, false, getPosASL (_this select 1),3.16228,1,75]; (_this select 0) setVariable [QGVAR(Dialing), false, true]; - }, [_unit,_explosive], 0.25 * (count _arr - 4), 0] call EFUNC(common,waitAndExecute); - [_explosive,0.25 * (count _arr - 1)] call FUNC(startTimer); + }, [_unit,_explosive select 0], 0.25 * (count _arr - 4), 0] call EFUNC(common,waitAndExecute); + [_explosive select 0,(0.25 * (count _arr - 1)) + (_explosive select 2)] call FUNC(startTimer); }; }; diff --git a/addons/explosives/functions/fnc_dialingPhone.sqf b/addons/explosives/functions/fnc_dialingPhone.sqf index c50f618abe..003fd734c1 100644 --- a/addons/explosives/functions/fnc_dialingPhone.sqf +++ b/addons/explosives/functions/fnc_dialingPhone.sqf @@ -38,7 +38,7 @@ if (_i >= (count _arr + 2)) then { }; if (_i == (count _arr)) then { if (!isNull (_explosive)) then { - playSound3D [QUOTE(PATHTOF_R(Data\Audio\Cellphone_Ring.wss)),objNull, false, getPosATL (_explosive select 0),3.16228,1,75]; + playSound3D [QUOTE(PATHTOF_R(Data\Audio\Cellphone_Ring.wss)),objNull, false, getPosASL (_explosive select 0),3.16228,1,75]; }; }; (_this select 0) set [1, _i + 1]; diff --git a/addons/explosives/functions/fnc_setSpeedDial.sqf b/addons/explosives/functions/fnc_setSpeedDial.sqf index 20a32a1224..adb2e6af03 100644 --- a/addons/explosives/functions/fnc_setSpeedDial.sqf +++ b/addons/explosives/functions/fnc_setSpeedDial.sqf @@ -20,9 +20,7 @@ _speedDial = ace_player getVariable [QGVAR(SpeedDial), []]; if (count _speedDial == 0) exitWith {}; _amount = if((_this select 0))then{1}else{-1}; -GVAR(CurrentSpeedDial) = GVAR(CurrentSpeedDial) + _amount; -GVAR(CurrentSpeedDial) = if(GVAR(CurrentSpeedDial) < 0)then{(count _speedDial)-1}else{GVAR(CurrentSpeedDial)}; -GVAR(CurrentSpeedDial) = if(GVAR(CurrentSpeedDial) >= (count _speedDial))then{0}else{GVAR(CurrentSpeedDial)}; +GVAR(CurrentSpeedDial) = (GVAR(CurrentSpeedDial) + _amount + count _speedDial) mod (count _speedDial); ctrlSetText [1400,(_speedDial select GVAR(CurrentSpeedDial)) select 1]; ctrlSetText [1401,(_speedDial select GVAR(CurrentSpeedDial)) select 0];