Move more debug lines to #ifdef (#1829)

* Move more debug lines to #ifdef

Tidys up server RPT

Also make the combination rolling text overwrite the previous build
spam.

* Make additional changes
This commit is contained in:
oiad
2016-12-26 11:20:30 +13:00
committed by ebayShopper
parent 7496ef5d5c
commit 75243933b4
7 changed files with 49 additions and 4 deletions

View File

@@ -1,5 +1,7 @@
private ["_activatingPlayer","_isOK","_object","_worldspace","_location","_dir","_class","_uid","_key","_keySelected","_characterID","_donotusekey"];
//PVDZE_veh_Publish2 = [_veh,[_dir,_location],_part_out,false,_keySelected,_activatingPlayer];
#include "\z\addons\dayz_server\compile\server_toggle_debug.hpp"
_object = _this select 0;
_worldspace = _this select 1;
_class = _this select 2;
@@ -11,14 +13,20 @@ _characterID = _keySelected;
_isOK = isClass(configFile >> "CfgVehicles" >> _class);
if(!_isOK || isNull _object) exitWith { diag_log ("HIVE-pv3: Vehicle does not exist: "+ str(_class)); };
#ifdef OBJECT_DEBUG
diag_log ("PUBLISH: Attempt " + str(_object));
#endif
_dir = _worldspace select 0;
_location = _worldspace select 1;
_uid = _worldspace call dayz_objectUID2;
//Send request
_key = format["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:",dayZ_instance, _class, 0 , _characterID, _worldspace, [], [], 1,_uid];
#ifdef OBJECT_DEBUG
diag_log ("HIVE: WRITE: "+ str(_key));
#endif
_key call server_hiveWrite;
// Switched to spawn so we can wait a bit for the ID
@@ -43,13 +51,19 @@ _key call server_hiveWrite;
while {_retry < 10} do {
// GET DB ID
_key = format["CHILD:388:%1:",_uid];
#ifdef OBJECT_DEBUG
diag_log ("HIVE: WRITE: "+ str(_key));
#endif
_result = _key call server_hiveReadWrite;
_outcome = _result select 0;
if (_outcome == "PASS") then {
_oid = _result select 1;
//_object setVariable ["ObjectID", _oid, true];
#ifdef OBJECT_DEBUG
diag_log("CUSTOM: Selected " + str(_oid));
#endif
_done = true;
_retry = 100;