Remove OEMPos variable

I do not see any use for this variable any longer. Ive tested building, upgrading lock/unlock objects. It seems it has no affect and can be replaced with the normal getPosATL from objects.
This commit is contained in:
A Man
2022-03-26 14:53:12 +01:00
parent cf6ca366d3
commit fc6680c360
8 changed files with 7 additions and 14 deletions

View File

@@ -68,7 +68,7 @@ if (_isStorage) then {
sk_changeCode = [player,_cursorTarget,dayz_combination,dayz_authKey];
publicVariableServer "sk_changeCode";
} else {
_location = _cursorTarget getVariable["OEMPos",getPosATL _cursorTarget];
_location = getPosATL _cursorTarget;
_dir = getDir _cursorTarget;
_vector = [vectorDir _cursorTarget,vectorUp _cursorTarget];

View File

@@ -1418,7 +1418,6 @@ if (_canBuild) then {
call player_forceSave;
[format[localize "str_build_01", _text], 1] call dayz_rollingMessages;
_builtObject setVariable ["OEMPos", _position, true]; // store original location as a variable
if (_lockable > 1) then { //if item has code lock on it

View File

@@ -84,7 +84,7 @@ if (count _upgrade > 0) then {
if (_i > 0) then {
local _position = _obj getVariable["OEMPos", getPosATL _obj];
local _position = getPosATL _obj;
local _dir = getDir _obj;
local _vector = [(vectorDir _obj), (vectorUp _obj)];

View File

@@ -138,11 +138,11 @@ if ((count _upgrade) > 0) then {
call player_forceSave;
local _location = _obj getVariable["OEMPos", (getPosATL _obj)];
local _dir = getDir _obj;
local _location = getPosATL _obj;
local _dir = getDir _obj;
local _vector = [vectorDir _obj, vectorUp _obj];
local _objectCharacterID = _obj getVariable ["CharacterID","0"];
_classname = _newclassname;
_classname = _newclassname;
local _object = createVehicle [_classname, [0,0,0], [], 0, "CAN_COLLIDE"];
//_object setDir _dir; // setdir is incompatible with setVectorDirAndUp and should not be used together on the same object https://community.bistudio.com/wiki/setVectorDirAndUp