Fix ArmoredSUV gunner glitch #2009

Fixes #2009

Note the fn_damageActions.sqf change can be applied without the config
change and it will still fix the problem most of the time.
This commit is contained in:
ebayShopper
2017-12-29 17:21:40 -05:00
parent eaaedf21c0
commit e89eebc843
3 changed files with 5 additions and 6 deletions

View File

@@ -1 +1,2 @@
[FIXED] Some more occurrences of zero_building interiors misaligned or at the wrong terrain height
[FIXED] Some more occurrences of zero_building interiors misaligned or at the wrong terrain height (eaaedf2)
[FIXED] Player could switch into gunner's seat of ArmoredSUV while the hatch was being closed #2009 @TheFirstNoob

View File

@@ -275,7 +275,7 @@ class ArmoredSUV_Base_PMC: Car
radius = 1;
onlyForPlayer = 1;
condition = "isNull (this turretUnit [0]) && (this animationPhase 'HideGun_01' == 0)";
statement = "this spawn {_this animate ['HideGun_01',1]; uiSleep 1; _this animate ['CloseCover1',1]; _this animate ['CloseCover2',1];};";
statement = "this animate ['HideGun_01',1]; this spawn {uiSleep 1; _this animate ['CloseCover1',1]; _this animate ['CloseCover2',1];};";
};
};
};

View File

@@ -22,11 +22,9 @@ if (_inVehicle) then {
_driver = driver (vehicle player);
if (str (_assignedRole) != str (r_player_lastSeat)) then {
call r_player_removeActions2;
if (_vehicle isKindOf "ArmoredSUV_Base_PMC" && {_vehicle animationPhase "HideGun_01" == 1} && {_vehicle emptyPositions "Gunner" == 0}) then {
if (_vehicle isKindOf "ArmoredSUV_Base_PMC" && {_vehicle animationPhase "HideGun_01" != 0} && {_vehicle emptyPositions "Gunner" == 0}) then {
//If player enters gunner's seat while hatch is closed then move them out
(_vehicle turretUnit [0]) action ["moveToCargo",_vehicle,(count assignedCargo _vehicle)];
_vehicle animate ["HideGun_01",0];
_vehicle animate ["CloseCover1",0];
_vehicle animate ["CloseCover2",0];
};
};
if (!r_player_unconscious && !r_action2) then {