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

@@ -539,7 +539,7 @@ if (_canBuild select 0) then {
};
publicVariableServer "PVDZ_obj_Publish";
format[localize "str_epoch_player_140",_combinationDisplay,_text] call dayz_rollingMessages; //display new combination
[format[localize "str_epoch_player_140",_combinationDisplay,_text],1] call dayz_rollingMessages; //display new combination
systemChat format[localize "str_epoch_player_140",_combinationDisplay,_text];
} else { //if not lockable item

View File

@@ -445,7 +445,7 @@ if (_canBuild select 0) then {
};
publicVariableServer "PVDZ_obj_Publish";
format[localize "str_epoch_player_140",_combinationDisplay,_text] call dayz_rollingMessages;
[format[localize "str_epoch_player_140",_combinationDisplay,_text],1] call dayz_rollingMessages;
systemChat format[localize "str_epoch_player_140",_combinationDisplay,_text];
} else {

View File

@@ -1,4 +1,5 @@
private ["_class","_inventory","_hitpoints","_damage","_fuel","_uid","_charID","_object","_worldspace","_key","_allowed"];
#include "\z\addons\dayz_server\compile\server_toggle_debug.hpp"
_charID = _this select 0;
_object = _this select 1;
@@ -12,7 +13,9 @@ _fuel = _this select 7;
_allowed = [_object, "Server"] call check_publishobject;
if (!_allowed) exitWith { deleteVehicle _object; };
#ifdef OBJECT_DEBUG
diag_log ("PUBLISH: Attempt " + str(_object));
#endif
//get UID
_uid = _worldspace call dayz_objectUID2;

View File

@@ -1,5 +1,7 @@
private ["_object","_worldspace","_location","_dir","_class","_uid","_dam","_hitpoints","_selection","_array","_damage","_fuel","_key","_totaldam","_spawnDMG","_characterID"];
//[_veh,[_dir,_location],"V3S_Civ",true]
#include "\z\addons\dayz_server\compile\server_toggle_debug.hpp"
_object = _this select 0;
_worldspace = _this select 1;
_class = _this select 2;
@@ -10,7 +12,10 @@ _fuel = 1;
_damage = 0;
_array = [];
#ifdef OBJECT_DEBUG
diag_log ("PUBLISH: Attempt " + str(_object));
#endif
_dir = _worldspace select 0;
_location = _worldspace select 1;
@@ -51,7 +56,9 @@ if (_spawnDMG) then {
//Send request
_key = format["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:",dayZ_instance, _class, _damage , _characterID, _worldspace, [], _array, _fuel,_uid];
#ifdef OBJECT_DEBUG
diag_log ("HIVE: WRITE: "+ str(_key));
#endif
_key call server_hiveWrite;
dayz_serverObjectMonitor set [count dayz_serverObjectMonitor,_object];
@@ -74,13 +81,17 @@ dayz_serverObjectMonitor set [count dayz_serverObjectMonitor,_object];
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;
} else {

View File

@@ -1,5 +1,7 @@
private ["_activatingPlayer","_isOK","_worldspace","_location","_dir","_class","_uid","_key","_keySelected","_characterID","_donotusekey"];
//PVDZE_veh_Publish2 = [[_dir,_location],_part_out,false,_keySelected,_activatingPlayer];
#include "\z\addons\dayz_server\compile\server_toggle_debug.hpp"
_worldspace = _this select 0;
_class = _this select 1;
_donotusekey = _this select 2;
@@ -26,7 +28,11 @@ _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
@@ -47,12 +53,18 @@ _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;
#ifdef OBJECT_DEBUG
diag_log("CUSTOM: Selected " + str(_oid));
#endif
_done = true;
_retry = 100;

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;

View File

@@ -153,8 +153,10 @@ _object_damage = {
} else {
_key = format["CHILD:306:%1:",_objectID] + str _array + ":" + str _damage + ":";
};
#ifdef OBJECT_DEBUG
diag_log ("HIVE: WRITE: "+ str(_key));
#endif
_key call server_hiveWrite;
};
};
@@ -169,8 +171,9 @@ _objWallDamage = {
} else {
_key = format["CHILD:306:%1:%2:%3:",_objectID,[],_damage];
};
#ifdef OBJECT_DEBUG
diag_log ("HIVE: WRITE: "+ str(_key));
#endif
_key call server_hiveWrite;
};
@@ -188,7 +191,9 @@ _object_killed = {
};
_key call server_hiveWrite;
#ifdef OBJECT_DEBUG
diag_log format["DELETE: Deleted by KEY: %1",_key];
#endif
if (((typeOf _object) in DayZ_removableObjects) or ((typeOf _object) in DZE_isRemovable)) then {[_objectID,_objectUID] call server_deleteObj;};
};