diff --git a/SQF/dayz_code/actions/changeCode.sqf b/SQF/dayz_code/actions/changeCode.sqf index 4ec5e0cdf..d9d34329a 100644 --- a/SQF/dayz_code/actions/changeCode.sqf +++ b/SQF/dayz_code/actions/changeCode.sqf @@ -73,7 +73,7 @@ if (_isStorage) then { _vector = [vectorDir _cursorTarget,vectorUp _cursorTarget]; _object = createVehicle [_typeOf, [0,0,0], [], 0, "CAN_COLLIDE"]; - _object setDir _dir; + //_object setDir _dir; // setdir is incompatible with setVectorDirAndUp and should not be used together on the same object https://community.bistudio.com/wiki/setVectorDirAndUp _object setVectorDirAndUp _vector; _object setPosATL _location; _object setVariable ["memDir",_dir,true]; diff --git a/SQF/dayz_code/actions/modular_build.sqf b/SQF/dayz_code/actions/modular_build.sqf index a2929fed7..97c8298e4 100644 --- a/SQF/dayz_code/actions/modular_build.sqf +++ b/SQF/dayz_code/actions/modular_build.sqf @@ -362,7 +362,7 @@ if (_canBuild select 0) then { if (!_cancel) then { _classname = _classnametmp; _tmpbuilt = _classname createVehicle _location; - _tmpbuilt setdir _dir; + //_tmpbuilt setdir _dir; // setdir is incompatible with setVectorDirAndUp and should not be used together on the same object https://community.bistudio.com/wiki/setVectorDirAndUp _tmpbuilt setVariable["memDir",_dir,true]; _location = _position; diff --git a/SQF/dayz_code/actions/player_buildingDowngrade.sqf b/SQF/dayz_code/actions/player_buildingDowngrade.sqf index 61ac6be4a..467d40125 100644 --- a/SQF/dayz_code/actions/player_buildingDowngrade.sqf +++ b/SQF/dayz_code/actions/player_buildingDowngrade.sqf @@ -79,7 +79,7 @@ if ((count _upgrade) > 0) then { _classname = _newclassname; _object = createVehicle [_classname, [0,0,0], [], 0, "CAN_COLLIDE"]; - _object setDir _dir; + //_object setDir _dir; // setdir is incompatible with setVectorDirAndUp and should not be used together on the same object https://community.bistudio.com/wiki/setVectorDirAndUp _object setVariable["memDir",_dir,true]; _object setVectorDirAndUp _vector; _object setPosATL _location; diff --git a/SQF/dayz_code/actions/player_upgrade.sqf b/SQF/dayz_code/actions/player_upgrade.sqf index bbfc082f7..6150ffb44 100644 --- a/SQF/dayz_code/actions/player_upgrade.sqf +++ b/SQF/dayz_code/actions/player_upgrade.sqf @@ -117,7 +117,7 @@ if ((count _upgrade) > 0) then { _objectCharacterID = _obj getVariable ["CharacterID","0"]; _classname = _newclassname; _object = createVehicle [_classname, [0,0,0], [], 0, "CAN_COLLIDE"]; - _object setDir _dir; + //_object setDir _dir; // setdir is incompatible with setVectorDirAndUp and should not be used together on the same object https://community.bistudio.com/wiki/setVectorDirAndUp _object setVariable["memDir",_dir,true]; _object setVectorDirAndUp _vector; _object setPosATL _location; diff --git a/SQF/dayz_server/compile/server_changeCode.sqf b/SQF/dayz_server/compile/server_changeCode.sqf index 37ac06af4..561348c1c 100644 --- a/SQF/dayz_server/compile/server_changeCode.sqf +++ b/SQF/dayz_server/compile/server_changeCode.sqf @@ -40,7 +40,7 @@ if (Z_singleCurrency) then {_coins = _object getVariable ["cashMoney",0];}; [_objectID,_objectUID,_object] call server_deleteObjDirect; _holder = _lockedClass createVehicle [0,0,0]; -_holder setDir _dir; +//_holder setDir _dir; // setdir is incompatible with setVectorDirAndUp and should not be used together on the same object https://community.bistudio.com/wiki/setVectorDirAndUp _holder setVariable ["memDir",_dir,true]; _holder setVectorDirAndUp _vector; _holder setPosATL _pos; diff --git a/SQF/dayz_server/compile/server_handleSafeGear.sqf b/SQF/dayz_server/compile/server_handleSafeGear.sqf index 8426c41f0..524166bdc 100644 --- a/SQF/dayz_server/compile/server_handleSafeGear.sqf +++ b/SQF/dayz_server/compile/server_handleSafeGear.sqf @@ -61,7 +61,7 @@ call { // Create new unlocked safe, then delete old locked safe _holder = _unlockedClass createVehicle [0,0,0]; - _holder setDir _dir; + //_holder setDir _dir; // setdir is incompatible with setVectorDirAndUp and should not be used together on the same object https://community.bistudio.com/wiki/setVectorDirAndUp _holder setVariable ["memDir",_dir,true]; _holder setVectorDirAndUp _vector; _holder setPosATL _pos; @@ -89,7 +89,7 @@ call { // Create new locked safe, then delete old unlocked safe _holder = _lockedClass createVehicle [0,0,0]; - _holder setDir _dir; + //_holder setDir _dir; // setdir is incompatible with setVectorDirAndUp and should not be used together on the same object https://community.bistudio.com/wiki/setVectorDirAndUp _holder setVariable ["memDir",_dir,true]; _holder setVectorDirAndUp _vector; _holder setPosATL _pos; diff --git a/SQF/dayz_server/system/server_monitor.sqf b/SQF/dayz_server/system/server_monitor.sqf index fcf651f0c..2fa703139 100644 --- a/SQF/dayz_server/system/server_monitor.sqf +++ b/SQF/dayz_server/system/server_monitor.sqf @@ -183,14 +183,16 @@ if ((playersNumber west + playersNumber civilian) == 0) exitWith { }; }; - _object = _type createVehicle [0,0,0]; //more than 2x faster than createvehicle array - _object setDir _dir; - _object setPosATL _pos; + _object = _type createVehicle [0,0,0]; //more than 2x faster than createvehicle array _object setDamage _damage; + if (_vecExists) then { _object setVectorDirAndUp _vector; + } else { + _object setDir _dir; // setdir is incompatible with setVectorDirAndUp and should not be used together on the same object https://community.bistudio.com/wiki/setVectorDirAndUp }; _object enableSimulation false; + _object setPosATL _pos; _doorLocked = _type in DZE_DoorsLocked; _isPlot = _type == "Plastic_Pole_EP1_DZ";