mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge pull request #3947 from acemod/fixCarrySitting
Fix ability to carry a chair someone is sitting on
This commit is contained in:
commit
ffd207dcf7
@ -19,5 +19,5 @@ params ["_seat"];
|
||||
|
||||
// Sitting enabled, is seat object, not occupied and standing up (or not on a big slope)
|
||||
GVAR(enable) &&
|
||||
{isNil {_seat getVariable QGVAR(seatOccupied)}} &&
|
||||
{!(_seat call EFUNC(common,owned))} &&
|
||||
{round (vectorUp _seat select 0) == 0 && {round (vectorUp _seat select 1) == 0} && {round (vectorUp _seat select 2) == 1}}
|
||||
|
@ -49,7 +49,7 @@ _player setPosASL (AGLtoASL (_seat modelToWorld _sitPosition));
|
||||
|
||||
// Set variables, save seat object on player
|
||||
_player setVariable [QGVAR(isSitting), [_seat, _actionID]];
|
||||
_seat setVariable [QGVAR(seatOccupied), true, true]; // To prevent multiple people sitting on one seat
|
||||
[_player, _seat] call EFUNC(common,claim); // To prevent multiple people sitting on one seat
|
||||
|
||||
|
||||
// Add automatical stand PFH in case of interruptions
|
||||
|
@ -35,4 +35,4 @@ private _animation = switch (currentWeapon _player) do {
|
||||
// Set variables to nil
|
||||
_player setVariable [QGVAR(isSitting), nil];
|
||||
if (isNull _seat) exitWith {};
|
||||
_seat setVariable [QGVAR(seatOccupied), nil, true];
|
||||
[objNull, _seat] call EFUNC(common,claim);
|
||||
|
Loading…
Reference in New Issue
Block a user