mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Added isNotSitting exception, Renamed sitting QGVAR
This commit is contained in:
parent
c6b5c705c7
commit
95ec2ea1f9
@ -3,3 +3,10 @@ class Extended_PreInit_EventHandlers {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_preInit));
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
class Extended_PostInit_EventHandlers {
|
||||
class ADDON {
|
||||
clientInit = QUOTE(call COMPILE_FILE(XEH_clientInit));
|
||||
};
|
||||
};
|
||||
|
3
addons/sitting/XEH_clientInit.sqf
Normal file
3
addons/sitting/XEH_clientInit.sqf
Normal file
@ -0,0 +1,3 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
["isNotSitting", {!((_this select 0) getVariable [QGVAR(isSitting), false])}] call EFUNC(common,addCanInteractWithCondition);
|
@ -17,5 +17,5 @@
|
||||
|
||||
PARAMS_1(_player);
|
||||
|
||||
// If sitting
|
||||
(_player getVariable [QGVAR(sitting),false])
|
||||
// Sitting
|
||||
(_player getVariable [QGVAR(isSitting),false])
|
||||
|
@ -36,5 +36,5 @@ _player setPos (_seat modelToWorld _sitPosition);
|
||||
[_player, call FUNC(getRandomAnimation), 2] call EFUNC(common,doAnimation);
|
||||
|
||||
// Set variables
|
||||
_player setVariable [QGVAR(sitting), true];
|
||||
_player setVariable [QGVAR(isSitting), true];
|
||||
_seat setVariable [QGVAR(seatOccupied), true, true]; // To prevent multiple people sitting on one seat
|
||||
|
@ -21,6 +21,6 @@ PARAMS_1(_player);
|
||||
[_player, "", 2] call EFUNC(common,doAnimation);
|
||||
|
||||
// Set variables to nil
|
||||
_player setVariable [QGVAR(sitting), nil];
|
||||
_player setVariable [QGVAR(isSitting), nil];
|
||||
GVAR(seat) setVariable [QGVAR(seatOccupied), nil, true];
|
||||
GVAR(seat) = nil;
|
||||
|
Loading…
Reference in New Issue
Block a user