mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fixed Rattan Chair position, doAnimation before moving player
This commit is contained in:
parent
332afb2174
commit
3e0d4d1f7b
@ -100,7 +100,7 @@ class CfgVehicles {
|
||||
MACRO_SEAT_ACTION
|
||||
GVAR(canSit) = 1;
|
||||
GVAR(sitDirection) = 180;
|
||||
GVAR(sitPosition[]) = {0.07, 0.17, 1};
|
||||
GVAR(sitPosition[]) = {0, -0.1, -1}; // Z must be -1 due to chair's geometry (magic floating seat point)
|
||||
};
|
||||
// Field Toilet
|
||||
class Land_FieldToilet_F: ThingX {
|
||||
|
@ -29,13 +29,13 @@ private ["_sitDirection", "_sitPosition"];
|
||||
_sitDirection = getNumber (configFile >> "CfgVehicles" >> typeOf _seat >> QGVAR(sitDirection));
|
||||
_sitPosition = getArray (configFile >> "CfgVehicles" >> typeOf _seat >> QGVAR(sitPosition));
|
||||
|
||||
// Get random animation and perform it (before moving player to ensure correct placement)
|
||||
[_player, call FUNC(getRandomAnimation), 2] call EFUNC(common,doAnimation);
|
||||
|
||||
// Set direction and position
|
||||
_player setDir ((getDir _seat) + _sitDirection);
|
||||
_player setPos (_seat modelToWorld _sitPosition);
|
||||
|
||||
// Get random animation and perform it
|
||||
[_player, call FUNC(getRandomAnimation), 2] call EFUNC(common,doAnimation);
|
||||
|
||||
// Set variables
|
||||
_player setVariable [QGVAR(isSitting), true];
|
||||
_seat setVariable [QGVAR(seatOccupied), true, true]; // To prevent multiple people sitting on one seat
|
||||
|
Loading…
Reference in New Issue
Block a user