Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for seatSwitchedMan, reloaded, use native getInMan and getOutMan #293

Merged
merged 1 commit into from
Apr 22, 2016
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
2 changes: 2 additions & 0 deletions addons/xeh/CfgEventHandlers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,12 @@ class Extended_MPRespawn_EventHandlers {};
class Extended_Put_EventHandlers {};
class Extended_Respawn_EventHandlers {};
class Extended_SeatSwitched_EventHandlers {};
class Extended_SeatSwitchedMan_EventHandlers {};
class Extended_SoundPlayed_EventHandlers {};
class Extended_Take_EventHandlers {};
class Extended_WeaponAssembled_EventHandlers {};
class Extended_WeaponDisassembled_EventHandlers {};
class Extended_Reloaded_EventHandlers {};

// display xeh
class Extended_DisplayLoad_EventHandlers {
Expand Down
17 changes: 0 additions & 17 deletions addons/xeh/fnc_addClassEventHandler.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -38,23 +38,6 @@ if (!GVAR(fallbackRunning) && {ISINCOMP(_className)}) then {
// no such CfgVehicles class
if (!isClass _config) exitWith {false};

// handle custom event handlers
if (_eventName == "getInMan" && {isNil QGVAR(getInManAdded)}) then {
GVAR(getInManAdded) = ["All", "getIn", {
{
[_this select 2, _this select 1, _this select 0, _this select 3] call _x;
} forEach ((_this select 2) getVariable QGVAR(getInMan));
}] call CBA_fnc_addClassEventHandler;
};

if (_eventName == "getOutMan" && {isNil QGVAR(getOutManAdded)}) then {
GVAR(getOutManAdded) = ["All", "getOut", {
{
[_this select 2, _this select 1, _this select 0, _this select 3] call _x;
} forEach ((_this select 2) getVariable QGVAR(getOutMan));
}] call CBA_fnc_addClassEventHandler;
};

_eventName = toLower _eventName;

// no such event
Expand Down
4 changes: 3 additions & 1 deletion addons/xeh/script_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,10 @@
"Put", \
"Take", \
"SeatSwitched", \
"SeatSwitchedMan", \
"SoundPlayed", \
"WeaponAssembled", \
"WeaponDisassembled", \
"WeaponDeployed", \
"WeaponRested"
"WeaponRested", \
"Reloaded"
11 changes: 9 additions & 2 deletions addons/xeh/script_xeh.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ firedNear = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_fir
fuel = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_cba_xeh_fuel"")"; \
gear = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_gear"")"; \
getIn = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_getIn"")"; \
getInMan = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_getInMan"")"; \
getOut = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_getOut"")"; \
getOutMan = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_getOutMan"")"; \
handleHeal = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_handleHeal"")"; \
hit = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_hit"")"; \
hitPart = "{_this call _x} forEach ((_this select 0 select 0) getVariable ""cba_xeh_hitPart"")"; \
Expand All @@ -42,11 +44,13 @@ respawn = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_respa
put = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_put"")"; \
take = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_take"")"; \
seatSwitched = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_seatSwitched"")"; \
seatSwitchedMan = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_seatSwitchedMan"")"; \
soundPlayed = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_soundPlayed"")"; \
weaponAssembled = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_weaponAssembled"")"; \
weaponDisassembled = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_weaponDisassembled"")"; \
weaponDeployed = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_weaponDeployed"")"; \
weaponRested = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_weaponRested"")";
weaponRested = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_weaponRested"")"; \
reloaded = "{_this call _x} forEach ((_this select 0) getVariable ""cba_xeh_reloaded"")";


/*
Expand All @@ -73,7 +77,9 @@ firedNear = ""; \
fuel = ""; \
gear = ""; \
getIn = ""; \
getInMan = ""; \
getOut = ""; \
getOutMan = ""; \
handleHeal = ""; \
hit = ""; \
hitPart = ""; \
Expand All @@ -92,4 +98,5 @@ soundPlayed = ""; \
weaponAssembled = ""; \
weaponDisassembled = ""; \
weaponDeployed = ""; \
weaponRested = "";
weaponRested = ""; \
reloaded = "";