Skip to content

Commit

Permalink
Sitting - Fix ACEX Merge (acemod#8577)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonpas authored and AndreasBrostrom committed Dec 3, 2021
1 parent 933c967 commit e0c35f0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions addons/sitting/functions/fnc_addSitActions.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ if (_seat isEqualType objNull) then {
private _configFile = configFile >> "CfgVehicles" >> _type;

// Exit if sitting disabled or the object is not specified as a seat
if (!XGVAR(enable) || {getNumber (_configFile >> QGVAR(canSit)) != 1}) exitWith {};
if (!XGVAR(enable) || {getNumber (_configFile >> QXGVAR(canSit)) != 1}) exitWith {};

// Exit if class already initialized
if (_type in GVAR(initializedClasses)) exitWith {};
GVAR(initializedClasses) pushBack _type;

TRACE_1("Adding Sit Action",_type);

private _sitPosition = getArray (_configFile >> QGVAR(sitPosition));
private _interactPosition = getArray (_configFile >> QGVAR(interactPosition));
private _sitPosition = getArray (_configFile >> QXGVAR(sitPosition));
private _interactPosition = getArray (_configFile >> QXGVAR(interactPosition));

if (count _sitPosition != count _interactPosition) exitWith {
WARNING_1("Invalid sitting configuration of %1!",_type);
Expand Down
4 changes: 2 additions & 2 deletions addons/sitting/functions/fnc_sit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ private _actionID = _player addAction [

// Read config
private _configFile = configFile >> "CfgVehicles" >> typeOf _seat;
private _sitDirection = (getDir _seat) + (_seat getVariable [QGVAR(sitDirection), getNumber (_configFile >> QGVAR(sitDirection))]);
private _sitPositionAll = _seat getVariable [QGVAR(sitPosition), getArray (_configFile >> QGVAR(sitPosition))];
private _sitDirection = (getDir _seat) + (_seat getVariable [QXGVAR(sitDirection), getNumber (_configFile >> QXGVAR(sitDirection))]);
private _sitPositionAll = _seat getVariable [QXGVAR(sitPosition), getArray (_configFile >> QXGVAR(sitPosition))];
private _multiSitting = (_sitPositionAll select 0) isEqualType [];

private _sitPosition = _sitPositionAll;
Expand Down

0 comments on commit e0c35f0

Please sign in to comment.