From 2168d504bbb2760cce440221ae017ae79a4f8475 Mon Sep 17 00:00:00 2001 From: A Man Date: Thu, 24 Mar 2022 21:14:23 +0100 Subject: [PATCH] Remove more ObjectIDs and ObjectUIDs from certain scripts --- .../actions/player_buildingDowngrade.sqf | 9 --------- SQF/dayz_code/actions/player_upgrade.sqf | 4 +--- .../virtualGarage/player_storeVehicle.sqf | 6 ++---- .../actions/vkc/vehicleKeyChanger.sqf | 18 ++---------------- SQF/dayz_code/compile/player_packVault.sqf | 8 -------- .../compile/player_upgradeVehicle.sqf | 12 +++++------- SQF/dayz_code/old/object_upgradeFireplace.sqf | 4 +--- SQF/dayz_code/old/object_upgradeStorage.sqf | 18 ++++++------------ SQF/dayz_code/old/object_upgradebuilding.sqf | 6 ++---- SQF/dayz_code/old/trade_any_bicycle.sqf | 18 ++++-------------- SQF/dayz_code/old/trade_any_bicycle_old.sqf | 7 ++----- SQF/dayz_code/old/trade_any_boat.sqf | 11 +++-------- SQF/dayz_code/old/trade_any_boat_old.sqf | 7 ++----- SQF/dayz_code/old/trade_any_vehicle.sqf | 15 +++------------ SQF/dayz_code/old/trade_any_vehicle_free.sqf | 16 +++------------- SQF/dayz_code/old/trade_any_vehicle_old.sqf | 7 ++----- .../compile/server_publishVehicle3_vkc.sqf | 12 ++++++++++++ 17 files changed, 50 insertions(+), 128 deletions(-) diff --git a/SQF/dayz_code/actions/player_buildingDowngrade.sqf b/SQF/dayz_code/actions/player_buildingDowngrade.sqf index 47b5552c9..3be475a50 100644 --- a/SQF/dayz_code/actions/player_buildingDowngrade.sqf +++ b/SQF/dayz_code/actions/player_buildingDowngrade.sqf @@ -34,15 +34,6 @@ if (_playerNear) exitWith { // Another player is nearby. Only one player can localize "str_pickup_limit_5" call dayz_rollingMessages; }; -local _objectID = _obj getVariable ["ObjectID","0"]; -local _objectUID = _obj getVariable ["ObjectUID","0"]; - -if (_objectID == "0" && _objectUID == "0") exitWith { // Not setup yet. - dayz_actionInProgress = false; - s_player_downgrade_build = -1; - localize "str_epoch_player_50" call dayz_rollingMessages; -}; - /////////////////////////////////////////////////////////////////////////////////////////////////// local _classname = typeOf _obj; diff --git a/SQF/dayz_code/actions/player_upgrade.sqf b/SQF/dayz_code/actions/player_upgrade.sqf index 82c95d769..0fcf01507 100644 --- a/SQF/dayz_code/actions/player_upgrade.sqf +++ b/SQF/dayz_code/actions/player_upgrade.sqf @@ -17,11 +17,9 @@ player removeAction s_player_upgrade_build; s_player_upgrade_build = 1; local _obj = _this select 3; -local _objectID = _obj getVariable ["ObjectID","0"]; -local _objectUID = _obj getVariable ["ObjectUID","0"]; local _classname = typeOf _obj; -if ((_objectID == "0" && _objectUID == "0") || {_classname in DZE_DisableUpgrade}) exitWith { +if (_classname in DZE_DisableUpgrade) exitWith { dayz_actionInProgress = false; s_player_upgrade_build = -1; localize "str_epoch_player_50" call dayz_rollingMessages; // Not setup yet. diff --git a/SQF/dayz_code/actions/virtualGarage/player_storeVehicle.sqf b/SQF/dayz_code/actions/virtualGarage/player_storeVehicle.sqf index a5a5c65eb..80c8286bb 100644 --- a/SQF/dayz_code/actions/virtualGarage/player_storeVehicle.sqf +++ b/SQF/dayz_code/actions/virtualGarage/player_storeVehicle.sqf @@ -1,7 +1,7 @@ // Developed by [GZA] David for German Zombie Apocalypse Servers (https://zombieapo.eu/) // Rewritten by salival (https://github.com/oiad) -private ["_amount","_backPackCount","_backPackGear","_cargoAmount","_charID","_control","_counter","_display","_enoughMoney","_gearCount","_hasKey","_isLimitArray","_itemText","_items","_keyName","_limit","_magazineCount","_matchedCount","_moneyInfo","_name","_overLimit","_storedVehicles","_success","_typeName","_typeOf","_vehicle","_vehicleID","_vehicleUID","_wealth","_weaponsCount","_woGear","_playerNear","_ownerPUID","_plotCheck"]; +private ["_amount","_backPackCount","_backPackGear","_cargoAmount","_charID","_control","_counter","_display","_enoughMoney","_gearCount","_hasKey","_isLimitArray","_itemText","_items","_keyName","_limit","_magazineCount","_matchedCount","_moneyInfo","_name","_overLimit","_storedVehicles","_success","_typeName","_typeOf","_vehicle","_wealth","_weaponsCount","_woGear","_playerNear","_ownerPUID","_plotCheck"]; disableSerialization; @@ -65,14 +65,12 @@ closeDialog 0; if (!vg_storeWithGear && !_woGear) exitWith {localize "STR_CL_VG_NOSTOREWITHGEAR" call dayz_rollingMessages;}; _charID = _vehicle getVariable ["CharacterID","0"]; -_vehicleID = _vehicle getVariable ["ObjectID","0"]; -_vehicleUID = _vehicle getVariable ["ObjectUID","0"]; _weaponsCount = ((getWeaponCargo _vehicle) select 1) call _gearCount; _magazineCount = ((getMagazineCargo _vehicle) select 1) call _gearCount; _backPackCount = ((getBackpackCargo _vehicle) select 1) call _gearCount; _cargoAmount = (_weaponsCount + _magazineCount + _backPackCount); -if (_vehicleID == "1" || _vehicleUID == "1") exitWith {localize "STR_CL_VG_STORE_MISSION" call dayz_rollingMessages;}; +if (_charID == "-1") exitWith {localize "STR_CL_VG_STORE_MISSION" call dayz_rollingMessages;}; if (isNull DZE_myVehicle || !local DZE_myVehicle) exitWith {localize "STR_EPOCH_PLAYER_245" call dayz_rollingMessages;}; _hasKey = false; diff --git a/SQF/dayz_code/actions/vkc/vehicleKeyChanger.sqf b/SQF/dayz_code/actions/vkc/vehicleKeyChanger.sqf index dd003f4c0..bde477a6b 100644 --- a/SQF/dayz_code/actions/vkc/vehicleKeyChanger.sqf +++ b/SQF/dayz_code/actions/vkc/vehicleKeyChanger.sqf @@ -18,7 +18,7 @@ if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call day dayz_actionInProgress = true; disableSerialization; -private ["_amount","_characterID","_control","_currencyModifier","_enoughMoney","_exit","_foundPos","_index","_itemText","_message","_moneyInfo","_name","_playerNear","_position","_success","_typeOf","_vehicleID","_vehicleUID","_wealth"]; +private ["_amount","_characterID","_control","_currencyModifier","_enoughMoney","_exit","_foundPos","_index","_itemText","_message","_moneyInfo","_name","_playerNear","_position","_success","_typeOf","_wealth"]; vkc_cursorTarget = (_this select 3) select 0; _characterID = (_this select 3) select 1; @@ -52,24 +52,10 @@ if !(vkc_cursorTarget isKindOf "Air" || {vkc_cursorTarget isKindOf "LandVehicle" if (isNull DZE_myVehicle || {!(alive DZE_myVehicle)} || {!(local DZE_myVehicle)}) exitWith {call _exit; localize "str_epoch_player_245" call dayz_rollingMessages;}; -_vehicleID = vkc_cursorTarget getVariable ["ObjectID","0"]; -_vehicleUID = vkc_cursorTarget getVariable ["ObjectUID","0"]; - _typeOf = typeOf vkc_cursorTarget; _name = getText(configFile >> "cfgVehicles" >> _typeOf >> "displayName"); -if ((_vehicleID == "0" && {_vehicleUID == "0"}) || {_vehicleID == "1" || _vehicleUID == "1"}) exitWith {call _exit; format[localize "STR_CL_VKC_FAIL_SUPPORT",_name] call dayz_rollingMessages;}; - -if (_vehicleUID == "0") then { - _vehicleUID = ""; - { - _x = _x * 10; - if (_x < 0) then {_x = _x * -10}; - _vehicleUID = _vehicleUID + str(round(_x)); - } forEach getPosATL vkc_cursorTarget; - _vehicleUID = _vehicleUID + str(round((getDir vkc_cursorTarget) + time)); - vkc_cursorTarget setVariable["ObjectUID",_vehicleUID,true]; -}; +if (_characterID == "-1") exitWith {call _exit; format[localize "STR_CL_VKC_FAIL_SUPPORT",_name] call dayz_rollingMessages;}; vkc_keyList = call epoch_tempKeys; diff --git a/SQF/dayz_code/compile/player_packVault.sqf b/SQF/dayz_code/compile/player_packVault.sqf index ecc397c0f..180c46cc6 100644 --- a/SQF/dayz_code/compile/player_packVault.sqf +++ b/SQF/dayz_code/compile/player_packVault.sqf @@ -26,17 +26,9 @@ if (_playerNear) exitWith { }; local _ownerID = _obj getVariable["CharacterID","0"]; -local _objectID = _obj getVariable["ObjectID","0"]; -local _objectUID = _obj getVariable["ObjectUID","0"]; local _ComboMatch = (_ownerID == dayz_combination); _ownerID = _obj getVariable["ownerPUID","0"]; -if (_objectID == "0" && _objectUID == "0") exitWith { - dayz_actionInProgress = false; -// s_player_packvault = -1; - format[localize "str_epoch_player_118", _text] call dayz_rollingMessages; // %1 not setup yet. -}; - if (!_ComboMatch && (_ownerID != dayz_playerUID)) exitWith { dayz_actionInProgress = false; // s_player_packvault = -1; diff --git a/SQF/dayz_code/compile/player_upgradeVehicle.sqf b/SQF/dayz_code/compile/player_upgradeVehicle.sqf index 227966602..7b973f617 100644 --- a/SQF/dayz_code/compile/player_upgradeVehicle.sqf +++ b/SQF/dayz_code/compile/player_upgradeVehicle.sqf @@ -5,7 +5,7 @@ if (dayz_actionInProgress) exitWith {localize "STR_EPOCH_PLAYER_52" call dayz_rollingMessages;}; dayz_actionInProgress = true; -private ["_text","_requirementsTools","_upgradeName","_displayname","_vehicle","_proceed","_itemIn","_countIn","_missing","_missingQty","_qty","_removed","_tobe_removed_total","_textMissing","_num_removed","_removed_total","_objectID","_objectUID","_location","_dir","_objectCharacterID","_classname","_newclassname","_upgrade","_vehicle","_finished","_temp_removed_array_mag","_temp_removed_array_wep","_notNearestPlayer","_requirementsWeapon","_requirementsMagazine"]; +private ["_text","_requirementsTools","_upgradeName","_displayname","_vehicle","_proceed","_itemIn","_countIn","_missing","_missingQty","_qty","_removed","_tobe_removed_total","_textMissing","_num_removed","_removed_total","_location","_dir","_objectCharacterID","_classname","_newclassname","_upgrade","_vehicle","_finished","_temp_removed_array_mag","_temp_removed_array_wep","_notNearestPlayer","_requirementsWeapon","_requirementsMagazine"]; _upgrade = _this; _vehicle = cursorTarget; @@ -111,10 +111,10 @@ if (count (crew _vehicle) == 0) then { // all parts removed proceed if (_tobe_removed_total == _removed_total) then { call player_forceSave; - _objectID = _vehicle getVariable ["ObjectID","0"]; - _objectUID = _vehicle getVariable ["ObjectUID","0"]; + // Current charID + _objectCharacterID = _vehicle getVariable ["CharacterID","0"]; - if (_objectID == "0" && {_objectUID == "0"}) then { + if (_objectCharacterID == "-1") then { localize "str_epoch_player_50" call dayz_rollingMessages; } else { // Get position @@ -122,9 +122,7 @@ if (count (crew _vehicle) == 0) then { // Get direction _dir = getDir _vehicle; - - // Current charID - _objectCharacterID = _vehicle getVariable ["CharacterID","0"]; + localize "STR_EPOCH_VEHUP_IN_PROGRESS" call dayz_rollingMessages; [_newclassname,objNull] call fn_waitForObject; dze_waiting = nil; diff --git a/SQF/dayz_code/old/object_upgradeFireplace.sqf b/SQF/dayz_code/old/object_upgradeFireplace.sqf index f48dadc85..6b32a3f71 100644 --- a/SQF/dayz_code/old/object_upgradeFireplace.sqf +++ b/SQF/dayz_code/old/object_upgradeFireplace.sqf @@ -11,7 +11,7 @@ */ private ["_objclass","_cursorTarget","_item","_classname","_requiredTools","_requiredParts","_upgrade","_upgradeConfig", "_upgradeDisplayname","_onLadder","_isWater","_upgradeParts","_startUpgrade","_missingPartsConfig","_textMissingParts","_dis", -"_sfx","_ownerID","_objectID","_objectUID","_dir","_weapons","_magazines","_backpacks", +"_sfx","_ownerID","_dir","_weapons","_magazines","_backpacks", "_object","_itemName","_vector","_finished"]; _cursorTarget = _this select 0; @@ -106,8 +106,6 @@ if ((_startUpgrade) AND (isClass(_upgradeConfig))) then { //get ownerID from old tent. _ownerID = _cursorTarget getVariable ["characterID","0"]; - _objectID = _cursorTarget getVariable ["ObjectID","0"]; - _objectUID = _cursorTarget getVariable ["ObjectUID","0"]; //Get location and direction of old item _dir = round getDir _cursorTarget; diff --git a/SQF/dayz_code/old/object_upgradeStorage.sqf b/SQF/dayz_code/old/object_upgradeStorage.sqf index 4ba06508b..9a06c4149 100644 --- a/SQF/dayz_code/old/object_upgradeStorage.sqf +++ b/SQF/dayz_code/old/object_upgradeStorage.sqf @@ -11,16 +11,14 @@ dayz_actionInProgress = true; private ["_cursorTarget","_item","_classname","_requiredTools","_requiredParts","_upgrade","_upgradeConfig", "_upgradeDisplayname","_onLadder","_isWater","_upgradeParts","_startUpgrade","_missingPartsConfig","_textMissingParts","_dis", -"_sfx","_ownerID","_objectID","_objectUID","_dir","_weapons","_magazines","_backpacks","_object", +"_sfx","_ownerID","_dir","_weapons","_magazines","_backpacks","_object", "_itemName","_vector","_playerNear","_finished"]; _cursorTarget = _this select 3; _ownerID = _cursorTarget getVariable ["characterID","0"]; -_objectID = _cursorTarget getVariable ["ObjectID","0"]; -_objectUID = _cursorTarget getVariable ["ObjectUID","0"]; -if (isNil "_cursorTarget" or {isNull _cursorTarget} or {_objectUID == "0" && (_objectID == "0")}) exitWith { +if (isNil "_cursorTarget" or {isNull _cursorTarget}) exitWith { localize "str_cursorTargetNotFound" call dayz_rollingMessages; dayz_actionInProgress = false; }; @@ -91,9 +89,8 @@ if ((_startUpgrade) && (isClass(_upgradeConfig))) then { _magazines = getMagazineCargo _cursorTarget; _backpacks = getBackpackCargo _cursorTarget; - PVDZ_obj_Destroy = [_objectID,_objectUID,player,_pos,dayz_authKey,false]; + PVDZ_obj_Destroy = [netID player,netID _pos,dayz_authKey]; publicVariableServer "PVDZ_obj_Destroy"; - deleteVehicle _cursorTarget; { player removeMagazine _x; @@ -111,12 +108,9 @@ if ((_startUpgrade) && (isClass(_upgradeConfig))) then { [_weapons,_magazines,_backpacks,_object] call fn_addCargo; - if (DZE_permanentPlot) then { - _object setVariable ["ownerPUID",dayz_playerUID,true]; - PVDZ_obj_Publish = [dayz_characterID,_object,[_dir,_pos,dayz_playerUID],[_weapons,_magazines,_backpacks],player,dayz_authKey]; - } else { - PVDZ_obj_Publish = [dayz_characterID,_object,[_dir,_pos],[_weapons,_magazines,_backpacks],player,dayz_authKey]; - }; + _object setVariable ["ownerPUID",dayz_playerUID,true]; + PVDZ_obj_Publish = [dayz_characterID,_object,[_dir,_pos,dayz_playerUID],[_weapons,_magazines,_backpacks],player,dayz_authKey]; + publicVariableServer "PVDZ_obj_Publish"; //diag_log [diag_ticktime, __FILE__, "New Networked object, request to save to hive. PVDZ_obj_Publish:", PVDZ_obj_Publish]; diff --git a/SQF/dayz_code/old/object_upgradebuilding.sqf b/SQF/dayz_code/old/object_upgradebuilding.sqf index 1a7c3d410..eee1337ef 100644 --- a/SQF/dayz_code/old/object_upgradebuilding.sqf +++ b/SQF/dayz_code/old/object_upgradebuilding.sqf @@ -8,7 +8,7 @@ */ private ["_nearByChoppers","_cursorTarget","_type","_class","_requiredTools","_requiredParts","_upgradeType","_producedParts","_randomCreate", - "_upgradeClass","_onLadder","_isWater","_ok","_missing","_upgradeParts","_dis","_characterID","_objectID","_objectUID","_playerNear", + "_upgradeClass","_onLadder","_isWater","_ok","_missing","_upgradeParts","_dis","_characterID","_playerNear", "_ownerArray","_ownerPasscode","_dir","_vector","_object","_puid","_clanArray","_wh","_variables","_finished"]; _cursorTarget = _this; @@ -93,8 +93,6 @@ if (!_finished) exitWith { ["Working",0,[100,15,5,0]] call dayz_NutritionSystem; _characterID = _cursorTarget getVariable ["characterID","0"]; -_objectID = _cursorTarget getVariable ["ObjectID","0"]; -_objectUID = _cursorTarget getVariable ["ObjectUID","0"]; _ownerArray = _cursorTarget getVariable ["ownerArray",[]]; _ownerPasscode = _cursorTarget getVariable ["padlockCombination",[]]; _dir = round getDir _cursorTarget; @@ -120,7 +118,7 @@ _object setVariable ["ownerArray",_ownerArray,true]; _object setVariable ["padlockCombination",_ownerPasscode,true]; _object setVariable ["characterID",_characterID,true]; -PVDZ_obj_Destroy = [_objectID,_objectUID,player,_cursorTarget,dayz_authKey]; +PVDZ_obj_Destroy = [netID player,netID _cursorTarget,dayz_authKey]; publicVariableServer "PVDZ_obj_Destroy"; _wh = "WeaponHolder" createVehicle (getPosATL player); diff --git a/SQF/dayz_code/old/trade_any_bicycle.sqf b/SQF/dayz_code/old/trade_any_bicycle.sqf index eb10a6e11..f2e63ddb6 100644 --- a/SQF/dayz_code/old/trade_any_bicycle.sqf +++ b/SQF/dayz_code/old/trade_any_bicycle.sqf @@ -1,4 +1,4 @@ -private ["_sign","_location","_isOk","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_obj","_objectID","_objectUID","_bos","_started","_finished","_animState","_isMedic","_dir","_helipad","_keyColor","_keyNumber","_keySelected","_isKeyOK","_config","_damage","_tireDmg","_tires","_okToSell","_hitpoints","_needed","_activatingPlayer","_textPartIn","_textPartOut","_traderID","_canAfford","_trade_total","_total_currency","_return_change","_done"]; +private ["_sign","_location","_isOk","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_obj","_bos","_started","_finished","_animState","_isMedic","_dir","_helipad","_keyColor","_keyNumber","_keySelected","_isKeyOK","_config","_damage","_tireDmg","_tires","_okToSell","_hitpoints","_needed","_activatingPlayer","_textPartIn","_textPartOut","_traderID","_canAfford","_trade_total","_total_currency","_return_change","_done"]; if (dayz_actionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;}; dayz_actionInProgress = true; @@ -169,20 +169,10 @@ if (_finished) then { }; }; - _objectID = _obj getVariable ["ObjectID","0"]; - _objectUID = _obj getVariable ["ObjectUID","0"]; + if(local _obj && !isNull _obj && alive _obj) then { - _notSetup = (_objectID == "0" && _objectUID == "0"); - - if(local _obj && !isNull _obj && alive _obj && !_notSetup) then { - - if(_okToSell) then { - - - - //if(_objectID != "0" && _objectUID != "0") then { - - PVDZ_obj_Destroy = [_objectID,_objectUID,_activatingPlayer,_obj,dayz_authKey]; + if(_okToSell) then { + PVDZ_obj_Destroy = [netID _activatingPlayer,netID _obj,dayz_authKey]; publicVariableServer "PVDZ_obj_Destroy"; //deleteVehicle _obj; diff --git a/SQF/dayz_code/old/trade_any_bicycle_old.sqf b/SQF/dayz_code/old/trade_any_bicycle_old.sqf index 0a2e2c7c0..f05b080e4 100644 --- a/SQF/dayz_code/old/trade_any_bicycle_old.sqf +++ b/SQF/dayz_code/old/trade_any_bicycle_old.sqf @@ -1,4 +1,4 @@ -private ["_sign","_location","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_obj","_objectID","_objectUID","_bos","_started","_finished","_animState","_isMedic","_dir","_helipad","_removed","_damage","_tireDmg","_tires","_okToSell","_hitpoints","_needed","_activatingPlayer","_textPartIn","_textPartOut","_traderID","_playerNear"]; +private ["_sign","_location","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_obj","_bos","_started","_finished","_animState","_isMedic","_dir","_helipad","_removed","_damage","_tireDmg","_tires","_okToSell","_hitpoints","_needed","_activatingPlayer","_textPartIn","_textPartOut","_traderID","_playerNear"]; if (dayz_actionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;}; dayz_actionInProgress = true; @@ -152,10 +152,7 @@ if (_qty >= _qty_in) then { player addMagazine _part_out; }; - _objectID = _obj getVariable ["ObjectID","0"]; - _objectUID = _obj getVariable ["ObjectUID","0"]; - - PVDZ_obj_Destroy = [_objectID,_objectUID,_activatingPlayer,_obj,dayz_authKey]; + PVDZ_obj_Destroy = [netID _activatingPlayer,netID _obj,dayz_authKey]; publicVariableServer "PVDZ_obj_Destroy"; //deleteVehicle _obj; diff --git a/SQF/dayz_code/old/trade_any_boat.sqf b/SQF/dayz_code/old/trade_any_boat.sqf index cb1d9b313..30be77fa6 100644 --- a/SQF/dayz_code/old/trade_any_boat.sqf +++ b/SQF/dayz_code/old/trade_any_boat.sqf @@ -1,4 +1,4 @@ -private ["_sign","_location","_result","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_obj","_objectID","_objectUID","_bos","_started","_finished","_animState","_isMedic","_dir","_helipad","_damage","_tireDmg","_tires","_okToSell","_hitpoints","_needed","_activatingPlayer","_textPartIn","_textPartOut","_traderID","_canAfford","_trade_total","_total_currency","_return_change","_done"]; +private ["_sign","_location","_result","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_obj","_bos","_started","_finished","_animState","_isMedic","_dir","_helipad","_damage","_tireDmg","_tires","_okToSell","_hitpoints","_needed","_activatingPlayer","_textPartIn","_textPartOut","_traderID","_canAfford","_trade_total","_total_currency","_return_change","_done"]; if (dayz_actionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;}; dayz_actionInProgress = true; @@ -152,14 +152,9 @@ if (_finished) then { _obj = (_objects select 0); - _objectID = _obj getVariable ["ObjectID","0"]; - _objectUID = _obj getVariable ["ObjectUID","0"]; + if(local _obj && !isNull _obj && alive _obj) then { - _notSetup = (_objectID == "0" && _objectUID == "0"); - - if(local _obj && !isNull _obj && alive _obj && !_notSetup) then { - - PVDZ_obj_Destroy = [_objectID,_objectUID,_activatingPlayer,_obj,dayz_authKey]; + PVDZ_obj_Destroy = [netID _activatingPlayer,netID _obj,dayz_authKey]; publicVariableServer "PVDZ_obj_Destroy"; //deleteVehicle _obj; diff --git a/SQF/dayz_code/old/trade_any_boat_old.sqf b/SQF/dayz_code/old/trade_any_boat_old.sqf index 4def55c7e..dc1945649 100644 --- a/SQF/dayz_code/old/trade_any_boat_old.sqf +++ b/SQF/dayz_code/old/trade_any_boat_old.sqf @@ -1,4 +1,4 @@ -private ["_sign","_location","_result","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_obj","_objectID","_objectUID","_bos","_started","_finished","_animState","_isMedic","_dir","_helipad","_removed","_okToSell","_needed","_activatingPlayer","_textPartIn","_textPartOut","_traderID","_playerNear"]; +private ["_sign","_location","_result","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_obj","_bos","_started","_finished","_animState","_isMedic","_dir","_helipad","_removed","_okToSell","_needed","_activatingPlayer","_textPartIn","_textPartOut","_traderID","_playerNear"]; if (dayz_actionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;}; dayz_actionInProgress = true; @@ -139,10 +139,7 @@ if (_qty >= _qty_in) then { player addMagazine _part_out; }; - _objectID = _obj getVariable ["ObjectID","0"]; - _objectUID = _obj getVariable ["ObjectUID","0"]; - - PVDZ_obj_Destroy = [_objectID,_objectUID,_activatingPlayer,_obj,dayz_authKey]; + PVDZ_obj_Destroy = [netID _activatingPlayer,netID _obj,dayz_authKey]; publicVariableServer "PVDZ_obj_Destroy"; //deleteVehicle _obj; diff --git a/SQF/dayz_code/old/trade_any_vehicle.sqf b/SQF/dayz_code/old/trade_any_vehicle.sqf index dbd8157d0..506552451 100644 --- a/SQF/dayz_code/old/trade_any_vehicle.sqf +++ b/SQF/dayz_code/old/trade_any_vehicle.sqf @@ -1,4 +1,4 @@ -private ["_sign","_location","_result","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_obj","_objectID","_objectUID","_bos","_started","_finished","_animState","_isMedic","_dir","_helipad","_damage","_tireDmg","_tires","_okToSell","_temp_keys","_hitpoints","_needed","_activatingPlayer","_textPartIn","_textPartOut","_traderID","_canAfford","_trade_total","_total_currency","_return_change","_done"]; +private ["_sign","_location","_result","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_obj","_bos","_started","_finished","_animState","_isMedic","_dir","_helipad","_damage","_tireDmg","_tires","_okToSell","_temp_keys","_hitpoints","_needed","_activatingPlayer","_textPartIn","_textPartOut","_traderID","_canAfford","_trade_total","_total_currency","_return_change","_done"]; if (dayz_actionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;}; dayz_actionInProgress = true; @@ -176,19 +176,10 @@ if (_finished) then { }; }; - _objectID = _obj getVariable ["ObjectID","0"]; - _objectUID = _obj getVariable ["ObjectUID","0"]; - _objectCharacterId = _obj getVariable ["CharacterID","0"]; - - _notSetup = (_objectID == "0" && _objectUID == "0"); - - if(local _obj && !isNull _obj && alive _obj && !_notSetup) then { + if(local _obj && !isNull _obj && alive _obj) then { if(_okToSell) then { - - //if(_objectID != "0" && _objectUID != "0") then { - - PVDZ_obj_Destroy = [_objectID,_objectUID,_activatingPlayer,_obj,dayz_authKey]; + PVDZ_obj_Destroy = [netID _activatingPlayer,netID _obj,dayz_authKey]; publicVariableServer "PVDZ_obj_Destroy"; //deleteVehicle _obj; diff --git a/SQF/dayz_code/old/trade_any_vehicle_free.sqf b/SQF/dayz_code/old/trade_any_vehicle_free.sqf index 7258e03d1..04a6c2bda 100644 --- a/SQF/dayz_code/old/trade_any_vehicle_free.sqf +++ b/SQF/dayz_code/old/trade_any_vehicle_free.sqf @@ -1,4 +1,4 @@ -private ["_sign","_location","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_obj","_objectID","_objectUID","_bos","_started","_finished","_animState","_isMedic","_dir","_helipad","_damage","_tireDmg","_tires","_okToSell","_hitpoints","_needed","_activatingPlayer","_textPartIn","_textPartOut","_traderID","_canAfford","_trade_total","_total_currency","_return_change","_done"]; +private ["_sign","_location","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_obj","_bos","_started","_finished","_animState","_isMedic","_dir","_helipad","_damage","_tireDmg","_tires","_okToSell","_hitpoints","_needed","_activatingPlayer","_textPartIn","_textPartOut","_traderID","_canAfford","_trade_total","_total_currency","_return_change","_done"]; if (dayz_actionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;}; dayz_actionInProgress = true; @@ -171,20 +171,10 @@ if (_finished) then { }; }; - _objectID = _obj getVariable ["ObjectID","0"]; - _objectUID = _obj getVariable ["ObjectUID","0"]; - - _notSetup = (_objectID == "0" && _objectUID == "0"); - - if(local _obj && !isNull _obj && alive _obj && !_notSetup) then { + if(local _obj && !isNull _obj && alive _obj) then { if(_okToSell) then { - - - - //if(_objectID != "0" && _objectUID != "0") then { - - PVDZ_obj_Destroy = [_objectID,_objectUID,_activatingPlayer,_obj,dayz_authKey]; + PVDZ_obj_Destroy = [netID _activatingPlayer,netID _obj,dayz_authKey]; publicVariableServer "PVDZ_obj_Destroy"; //deleteVehicle _obj; diff --git a/SQF/dayz_code/old/trade_any_vehicle_old.sqf b/SQF/dayz_code/old/trade_any_vehicle_old.sqf index 8c9db3a4e..8912760be 100644 --- a/SQF/dayz_code/old/trade_any_vehicle_old.sqf +++ b/SQF/dayz_code/old/trade_any_vehicle_old.sqf @@ -1,4 +1,4 @@ -private ["_sign","_location","_result","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_obj","_objectID","_objectUID","_bos","_started","_finished","_animState","_isMedic","_dir","_helipad","_removed","_damage","_tireDmg","_tires","_okToSell","_hitpoints","_needed","_activatingPlayer","_textPartIn","_textPartOut","_traderID","_playerNear"]; +private ["_sign","_location","_result","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_obj","_bos","_started","_finished","_animState","_isMedic","_dir","_helipad","_removed","_damage","_tireDmg","_tires","_okToSell","_hitpoints","_needed","_activatingPlayer","_textPartIn","_textPartOut","_traderID","_playerNear"]; if (dayz_actionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;}; dayz_actionInProgress = true; @@ -159,10 +159,7 @@ if (_qty >= _qty_in) then { player addMagazine _part_out; }; - _objectID = _obj getVariable ["ObjectID","0"]; - _objectUID = _obj getVariable ["ObjectUID","0"]; - - PVDZ_obj_Destroy = [_objectID,_objectUID,_activatingPlayer,_obj,dayz_authKey]; + PVDZ_obj_Destroy = [netID _activatingPlayer,netID _obj,dayz_authKey]; publicVariableServer "PVDZ_obj_Destroy"; //deleteVehicle _obj; diff --git a/SQF/dayz_server/compile/server_publishVehicle3_vkc.sqf b/SQF/dayz_server/compile/server_publishVehicle3_vkc.sqf index 33741cc4f..dc2347feb 100644 --- a/SQF/dayz_server/compile/server_publishVehicle3_vkc.sqf +++ b/SQF/dayz_server/compile/server_publishVehicle3_vkc.sqf @@ -35,6 +35,18 @@ if (!(isClass(configFile >> "CfgVehicles" >> _class)) || isNull _object) exitWit _objectID = _object getVariable ["ObjectID","0"]; _objectUID = _object getVariable ["ObjectUID","0"]; + +if (_objectUID == "0") then { + _objectUID = ""; + { + _x = _x * 10; + if (_x < 0) then {_x = _x * -10}; + _objectUID = _objectUID + str(round(_x)); + } forEach getPosATL _object; + _objectUID = _objectUID + str(round((getDir _object) + time)); + _object setVariable ["ObjectUID",_objectUID]; +}; + _location = [_object] call fnc_getPos; _fuel = fuel _object; _hitpoints = _object call vehicle_getHitpoints;