diff --git a/SQF/dayz_code/actions/player_buildingMaint.sqf b/SQF/dayz_code/actions/player_buildingMaint.sqf index e9c81c487..ee1cb6878 100644 --- a/SQF/dayz_code/actions/player_buildingMaint.sqf +++ b/SQF/dayz_code/actions/player_buildingMaint.sqf @@ -95,7 +95,7 @@ if (_proceed) then { // Set location _object setPos _location; - dayzSwapObj = [_objectCharacterID,_object,[_dir,_location],_classname,_objectID,_objectUID,_obj]; + dayzSwapObj = [_objectCharacterID,_object,[_dir,_location],_classname,_obj,_objectID,_objectUID]; publicVariableServer "dayzSwapObj"; cutText [format["You have repaired %1.",_text], "PLAIN DOWN", 5]; diff --git a/SQF/dayz_code/actions/player_upgrade.sqf b/SQF/dayz_code/actions/player_upgrade.sqf index 2a3207e74..1158a59aa 100644 --- a/SQF/dayz_code/actions/player_upgrade.sqf +++ b/SQF/dayz_code/actions/player_upgrade.sqf @@ -159,7 +159,7 @@ if ((count _upgrade) > 0) then { cutText [format["You have upgraded %1.",_text], "PLAIN DOWN", 5]; }; - dayzSwapObj = [_objectCharacterID,_object,[_dir,_location],_classname,_objectID,_objectUID,_obj]; + dayzSwapObj = [_objectCharacterID,_object,[_dir,_location],_classname,_obj,_objectID,_objectUID]; publicVariableServer "dayzSwapObj"; player reveal _object; diff --git a/SQF/dayz_server/compile/server_swapObject.sqf b/SQF/dayz_server/compile/server_swapObject.sqf index ab60b7157..02d8feb65 100644 --- a/SQF/dayz_server/compile/server_swapObject.sqf +++ b/SQF/dayz_server/compile/server_swapObject.sqf @@ -11,12 +11,6 @@ _obj removeAllMPEventHandlers "MPKilled"; // Remove old object deleteVehicle _obj; -// Publish variables -_object setVariable ["CharacterID",_charID,true]; - -//_object setVariable ["ObjectUID",_objectUID,true]; -_object setVariable ["OEMPos",_worldspace,true]; - _objectID = _this select 5; _objectUID = _this select 6; @@ -27,6 +21,12 @@ if(_objectID == "0" && _objectUID == "0") exitWith {diag_log ("Object not valid: _allowed = [_object, "Server"] call check_publishobject; if (!_allowed) exitWith { deleteVehicle _object; }; +// Publish variables +_object setVariable ["CharacterID",_charID,true]; + +//_object setVariable ["ObjectUID",_objectUID,true]; +_object setVariable ["OEMPos",(_worldspace select 1),true]; + //diag_log ("PUBLISH: Attempt " + str(_object)); //get UID