Update object revealing

This replaces 'player reveal object' with a function that acutal reveals the objects to the player. This fixes that objects were not usable after building.
This commit is contained in:
A Man
2022-05-18 18:14:22 +02:00
parent f4d770c617
commit 0799e7e183
8 changed files with 21 additions and 17 deletions

View File

@@ -144,6 +144,8 @@ if ((count _upgrade) > 0) then {
local _objectCharacterID = _obj getVariable ["CharacterID","0"];
_classname = _newclassname;
[_classname,objNull] call fn_waitForObject;
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
_object setVariable["memDir", _dir, true];
@@ -225,8 +227,6 @@ if ((count _upgrade) > 0) then {
};
publicVariableServer "PVDZE_obj_Swap";
player reveal _object;
} else {
{player addMagazine _x;} count _temp_removed_array;