Cleanup sitRotation as it's no longer needed

This commit is contained in:
jonpas 2015-09-27 00:40:59 +02:00
parent e257827a69
commit e3985dce3e
2 changed files with 1 additions and 8 deletions

View File

@ -60,7 +60,6 @@ class CfgVehicles {
GVAR(canSit) = 1;
GVAR(sitDirection) = 180;
GVAR(sitPosition[]) = {0, -0.1, -0.45};
GVAR(sitRotation) = 10;
};
// Camping Chair
class Land_CampingChair_V2_F: ThingX {
@ -69,7 +68,6 @@ class CfgVehicles {
GVAR(canSit) = 1;
GVAR(sitDirection) = 180;
GVAR(sitPosition[]) = {0, -0.1, -0.45};
GVAR(sitRotation) = 45;
};
class Furniture_base_F;
@ -80,7 +78,6 @@ class CfgVehicles {
GVAR(canSit) = 1;
GVAR(sitDirection) = 90;
GVAR(sitPosition[]) = {0, 0, -0.5};
GVAR(sitRotation) = 5;
};
// Chair (Wooden)
class Land_ChairWood_F: Furniture_base_F {
@ -89,7 +86,6 @@ class CfgVehicles {
GVAR(canSit) = 1;
GVAR(sitDirection) = 180;
GVAR(sitPosition[]) = {0, -0.05, 0};
GVAR(sitRotation) = 75;
};
// Office Chair
class Land_OfficeChair_01_F: Furniture_base_F {
@ -98,7 +94,6 @@ class CfgVehicles {
GVAR(canSit) = 1;
GVAR(sitDirection) = 180;
GVAR(sitPosition[]) = {0, 0, -0.6};
GVAR(sitRotation) = 15;
};
// Rattan Chair
class Land_RattanChair_01_F: Furniture_base_F {
@ -107,6 +102,5 @@ class CfgVehicles {
GVAR(canSit) = 1;
GVAR(sitDirection) = 180;
GVAR(sitPosition[]) = {0, -0.1, -1}; // Z must be -1 due to chair's geometry (magic floating seat point)
GVAR(sitRotation) = 2;
};
};

View File

@ -16,7 +16,7 @@
*/
#include "script_component.hpp"
private ["_actionID", "_configFile", "_sitDirection", "_sitPosition", "_sitRotation", "_seatPosOrig"];
private ["_actionID", "_configFile", "_sitDirection", "_sitPosition", "_seatPosOrig"];
params ["_seat", "_player"];
@ -50,7 +50,6 @@ _player setVariable [QGVAR(StandUpActionID), _actionID];
_configFile = configFile >> "CfgVehicles" >> typeOf _seat;
_sitDirection = (getDir _seat) + getNumber (_configFile >> QGVAR(sitDirection));
_sitPosition = getArray (_configFile >> QGVAR(sitPosition));
_sitRotation = if (isNumber (_configFile >> QGVAR(sitRotation))) then {getNumber (_configFile >> QGVAR(sitRotation))} else {45}; // Apply default if config entry not present
// Get random animation and perform it (before moving player to ensure correct placement)
[_player, call FUNC(getRandomAnimation), 2] call EFUNC(common,doAnimation); // Correctly places when using non-transitional animations