Fix setdir and setVectorDirAndUp problem

Server admins should apply this fix at least for all their server files asap.
This commit is contained in:
AirwavesMan
2021-05-01 16:06:15 +02:00
parent 1a101e6bff
commit e35cccfcbc
7 changed files with 12 additions and 10 deletions

View File

@@ -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;

View File

@@ -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;

View File

@@ -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";