mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
Move large format strings to str formatText
These may exceed 2048 in some cases, so best to be safe and use str
formatText.
Partial revert of fbfb124 to more readable form
This commit is contained in:
@@ -124,7 +124,7 @@ if (!_isNew) then {
|
||||
if (!isNil "DefaultBackpack") then {_bcpk = DefaultBackpack;};
|
||||
|
||||
//Wait for HIVE to be free
|
||||
_key = format["CHILD:203:%1:%2:%3:",_charID,[_wpns,_mags],[_bcpk,[],[]]];
|
||||
_key = str formatText["CHILD:203:%1:%2:%3:",_charID,[_wpns,_mags],[_bcpk,[],[]]];
|
||||
_key call server_hiveWrite;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -220,11 +220,9 @@ if (count _playerPos > 0) then {
|
||||
|
||||
//Wait for HIVE to be free and send request
|
||||
_key = if (Z_SingleCurrency) then {
|
||||
"CHILD:201:" + _characterID + ":" + str(_playerPos) + ":" + str(_playerGear) + ":" + str(_playerBackp) + ":" + str(_medical) + ":false:false:" + str(_kills) + ":" + str(_headShots) + ":" + str(_distanceFoot) + ":" + str(_timeSince) + ":" + str(_currentState) + ":" + str(_killsH) + ":" + str(_killsB) + ":" + _currentModel + ":" + str(_humanity) + ":" + str(_coins) + ":";
|
||||
//format["CHILD:201:%1:%2:%3:%4:%5:%6:%7:%8:%9:%10:%11:%12:%13:%14:%15:%16:%17:",_characterID,_playerPos,_playerGear,_playerBackp,_medical,false,false,_kills,_headShots,_distanceFoot,_timeSince,_currentState,_killsH,_killsB,_currentModel,_humanity,_coins]
|
||||
str formatText["CHILD:201:%1:%2:%3:%4:%5:%6:%7:%8:%9:%10:%11:%12:%13:%14:%15:%16:%17:",_characterID,_playerPos,_playerGear,_playerBackp,_medical,false,false,_kills,_headShots,_distanceFoot,_timeSince,_currentState,_killsH,_killsB,_currentModel,_humanity,_coins]
|
||||
} else {
|
||||
"CHILD:201:" + _characterID + ":" + str(_playerPos) + ":" + str(_playerGear) + ":" + str(_playerBackp) + ":" + str(_medical) + ":false:false:" + str(_kills) + ":" + str(_headShots) + ":" + str(_distanceFoot) + ":" + str(_timeSince) + ":" + str(_currentState) + ":" + str(_killsH) + ":" + str(_killsB) + ":" + _currentModel + ":" + str(_humanity) + ":";
|
||||
//format["CHILD:201:%1:%2:%3:%4:%5:%6:%7:%8:%9:%10:%11:%12:%13:%14:%15:%16:",_characterID,_playerPos,_playerGear,_playerBackp,_medical,false,false,_kills,_headShots,_distanceFoot,_timeSince,_currentState,_killsH,_killsB,_currentModel,_humanity]
|
||||
str formatText["CHILD:201:%1:%2:%3:%4:%5:%6:%7:%8:%9:%10:%11:%12:%13:%14:%15:%16:",_characterID,_playerPos,_playerGear,_playerBackp,_medical,false,false,_kills,_headShots,_distanceFoot,_timeSince,_currentState,_killsH,_killsB,_currentModel,_humanity]
|
||||
};
|
||||
|
||||
//diag_log str formatText["INFO - %2(UID:%3) PlayerSync, %1",_key,_name,_playerUID];
|
||||
@@ -232,8 +230,7 @@ _key = if (Z_SingleCurrency) then {
|
||||
_key call server_hiveWrite;
|
||||
|
||||
if (Z_SingleCurrency) then { //update global coins
|
||||
//_key = format["CHILD:205:%1:%2:%3:%4:",_playerUID,dayZ_instance,_globalCoins,_bankCoins];
|
||||
_key = "CHILD:205:" + str(_playerUID) + ":" + str(dayZ_instance) + ":" + str(_globalCoins) + ":" + str(_bankCoins) + ":";
|
||||
_key = str formatText["CHILD:205:%1:%2:%3:%4:",_playerUID,dayZ_instance,_globalCoins,_bankCoins];
|
||||
_key call server_hiveWrite;
|
||||
};
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@ if ([_object, "Server"] call check_publishobject) then {
|
||||
// we can't use getVariable because only the object creation is known from the server (position,direction,variables are not sync'ed yet)
|
||||
//_characterID = _object getVariable [ "characterID", 0 ];
|
||||
//_ownerArray = _object getVariable [ "ownerArray", [] ];
|
||||
//_key = format["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:", dayZ_instance, _type, 0, _characterID, _worldspace, _inventory, [], 0,_objectUID ];
|
||||
_key = format["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:",dayZ_instance, _type, 0 , _characterID, _worldspace call AN_fnc_formatWorldspace, _inventory, [], 0,_objectUID]; // Precise Base Building 1.0.5
|
||||
//_key = str formatText["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:", dayZ_instance, _type, 0, _characterID, _worldspace, _inventory, [], 0,_objectUID];
|
||||
_key = str formatText["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:",dayZ_instance, _type, 0, _characterID, _worldspace call AN_fnc_formatWorldspace, _inventory, [], 0,_objectUID]; // Precise Base Building 1.0.5
|
||||
|
||||
_key call server_hiveWrite;
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ if (_spawnDMG) then {
|
||||
};
|
||||
};
|
||||
|
||||
_key = format["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:",dayZ_instance, _class, _damage , _characterID, _worldspace, [], _array, _fuel,_uid];
|
||||
_key = str formatText["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));
|
||||
|
||||
@@ -62,8 +62,8 @@ _object setVariable ["OEMPos",(_worldspace select 1),true];
|
||||
_uid = _worldspace call dayz_objectUID2;
|
||||
|
||||
//Send request
|
||||
//_key = format["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:",dayZ_instance, _class, 0 , _charID, _worldspace, [], [], 0,_uid];
|
||||
_key = format["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:",dayZ_instance, _class, 0 , _charID, _worldspace call AN_fnc_formatWorldspace, _inv, [], 0,_uid]; // Precise Base Building 1.0.5
|
||||
//_key = str formatText["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:",dayZ_instance, _class, 0, _charID, _worldspace, [], [], 0,_uid];
|
||||
_key = str formatText["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:",dayZ_instance, _class, 0, _charID, _worldspace call AN_fnc_formatWorldspace, _inv, [], 0,_uid]; // Precise Base Building 1.0.5
|
||||
|
||||
//diag_log ("HIVE: WRITE: "+ str(_key));
|
||||
_key call server_hiveWrite;
|
||||
|
||||
Reference in New Issue
Block a user