Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions addons/compat_wzc/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

if (!GVAR(enabled)) exitWith {};

[QGVAR(convertToZed), {
params ["_unit", "_animParams"];
_unit switchMove (_animParams select 0);
}] call CBA_fnc_addEventHandler;

if (hasInterface) then {
if (GVAR(infectionEnabled)) then {
call FUNC(infect);
Expand Down
2 changes: 1 addition & 1 deletion addons/compat_wzc/functions/fnc_convertToZombie.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
call EFUNC(common,getPlayerVariables) params ["", "", "", "", "", "", "", "_infection"];

if (!(player getVariable ["WBK_AI_ISZombie", false]) && _infection >= 1) then {
[player, ["WBK_Runner_Angry_Idle", 0, 0.2, false]] remoteExec ["switchMove", 0];
[QGVAR(convertToZed), [player, ["WBK_Runner_Angry_Idle", 0, 0.2, false]]] call CBA_fnc_globalEvent;
player setVariable ["WBK_SynthHP", WBK_Zombies_CorruptedHP, true];
player setVariable ["WBK_AI_ISZombie", true, true];
player setVariable ["WBK_AI_ZombieMoveSet", "WBK_Runner_Angry_Idle", true];
Expand Down
26 changes: 22 additions & 4 deletions addons/lantern/XEH_postInit.sqf
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
#include "script_component.hpp"

[QGVAR(deleteLantern), {
params ["_lantern"];
if (alive _lantern) then {
deleteVehicle _lantern;
};
}] call CBA_fnc_addEventHandler;

[QGVAR(attachLantern), {
params ["_lantern", "_attachParams"];
_lantern attachTo _attachParams;

// Since power component removes light from lanterns re-add it after its attached
[{
params ["_lantern"];
_lantern switchLight "ON";
}, [_lantern], 0.02] call CBA_fnc_waitAndExecute;
}] call CBA_fnc_addEventHandler;

if (isServer) then {

private _lanternBatteries = [
Expand All @@ -21,7 +39,7 @@ if (isServer) then {
if (_killed isEqualTo player && {local _killed}) then {
if (!isNil {_killed getVariable [QGVAR(state), nil]}) then {
private _lantern = _killed getVariable [QGVAR(state), nil];
[_lantern] remoteExec ["deleteVehicle", [0, -2] select isDedicated, _lantern];
[QGVAR(deleteLantern), [_lantern]] call CBA_fnc_globalEvent;
_killed setVariable [QGVAR(state), nil, true];
};
};
Expand All @@ -34,7 +52,7 @@ if (hasInterface) then {
if (_item isEqualTo QCLASS(lantern_On) && {local _unit}) then {
if (!isNil {_unit getVariable [QGVAR(state), nil]}) then {
private _lantern = _unit getVariable [QGVAR(state), nil];
[_lantern] remoteExec ["deleteVehicle", [0, -2] select isDedicated, _lantern];
[QGVAR(deleteLantern), [_lantern]] call CBA_fnc_globalEvent;
_unit setVariable [QGVAR(state), nil, true];
};
};
Expand All @@ -46,7 +64,7 @@ if (hasInterface) then {
if (isNil {_unit getVariable [QGVAR(state), nil]}) then {
private _lantern = "Land_Camping_Light_F" createVehicle position _unit;
_lantern setVariable [QGRADGVAR(persistence,isExcluded), true, true];
[_lantern, [_unit, [-0.17, -0.14, -0.06], "Pelvis", true]] remoteExec ["attachTo", [0, -2] select isDedicated, _lantern];
[QGVAR(attachLantern), [_lantern, [_unit, [-0.17, -0.14, -0.06], "Pelvis", true]]] call CBA_fnc_globalEvent;
_unit setVariable [QGVAR(state), _lantern, true];
};
};
Expand All @@ -58,7 +76,7 @@ if (hasInterface) then {
if (!isNil {player getVariable [QGVAR(state), nil]}) then {
private _lantern = player getVariable [QGVAR(state), nil];

[_lantern] remoteExec ["deleteVehicle", [0, -2] select isDedicated, _lantern];
[QGVAR(deleteLantern), [_lantern]] call CBA_fnc_globalEvent;

[player, [QCLASS(lantern_On), QCLASS(lantern_Off)], false] call EFUNC(common,switchPowerState);

Expand Down
4 changes: 2 additions & 2 deletions addons/lantern/functions/fnc_keybind.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ if ([[QCLASS(lantern_Off)]] call EFUNC(common,hasItem)) then {

_lantern setVariable [QGRADGVAR(persistence,isExcluded), true, true];

[_lantern, [player, [-0.17, -0.14, -0.06], "Pelvis", true]] remoteExec ["attachTo", [0, -2] select isDedicated, _lantern];
[QGVAR(attachLantern), [_lantern, [player, [-0.17, -0.14, -0.06], "Pelvis", true]]] call CBA_fnc_globalEvent;

player setVariable [QGVAR(state), _lantern, true];
};
Expand All @@ -38,7 +38,7 @@ if ([[QCLASS(lantern_On)]] call EFUNC(common,hasItem)) then {
if (!isNil {player getVariable [QGVAR(state), nil]}) then {
private _lantern = player getVariable [QGVAR(state), nil];

[_lantern] remoteExec ["deleteVehicle", [0, -2] select isDedicated, _lantern];
[QGVAR(deleteLantern), [_lantern]] call CBA_fnc_globalEvent;

[player, [QCLASS(lantern_On), QCLASS(lantern_Off)], false] call EFUNC(common,switchPowerState);

Expand Down
2 changes: 1 addition & 1 deletion addons/lantern/functions/fnc_logicCheck.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
if !([[QCLASS(lantern_On)]] call EFUNC(common,hasItem)) exitWith {
if (!isNil {player getVariable [QGVAR(state), nil]}) then {
private _lantern = player getVariable [QGVAR(state), nil];
[_lantern] remoteExec ["deleteVehicle", [0, -2] select isDedicated, _lantern];
[QGVAR(deleteLantern), [_lantern]] call CBA_fnc_globalEvent;
player setVariable [QGVAR(state), nil, true];
};
};
Expand Down
2 changes: 1 addition & 1 deletion addons/radio/functions/fnc_queueTrack.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ publicVariable QGVAR(allRadioSounds);
private _soundSource = createVehicle ["Land_HelipadEmpty_F", getPosASL _x, [], 0, "CAN_COLLIDE"];
_soundSource attachTo [_x, [0, 0, 0]];
GVAR(allRadioSounds) pushBack _soundSource;
[_soundSource, [_trkName, 150]] remoteExec ["say3D", 0, _soundSource];
[QEGVAR(audio,say3D), [_soundSource, _trkName, 150]] call CBA_fnc_globalEvent;
} forEach GVAR(allRadios);

publicVariable QGVAR(allRadioSounds);
Expand Down
5 changes: 5 additions & 0 deletions addons/repair/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,8 @@
["CBA_settingsInitialized", {
call FUNC(action);
}] call CBA_fnc_addEventHandler;

[QGVAR(repairVehiclePart), {
params ["_vehicle", "_repairParams"];
_vehicle setHitPointDamage _repairParams;
}] call CBA_fnc_addEventHandler;
2 changes: 1 addition & 1 deletion addons/repair/functions/fnc_process.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ private _fundsPerTick = _repairPrice / _totalSteps;
private _partDamage = _damages select _targetIndex;
private _newDamage = (_partDamage - _repairStep) max 0;

[_nearestVehicle, [_partName, _newDamage]] remoteExecCall ["setHitPointDamage", _nearestVehicle];
[QGVAR(repairVehiclePart), [_nearestVehicle, [_partName, _newDamage]]] call CBA_fnc_globalEvent;

[-_fundsPerTick] call EFUNC(currency,modifyMoney);

Expand Down
Loading