Better key calculation

append diag_ticktime to key. Max length is 24 characters in the DB so
the limit so this shouldn't cause issues unless the server is up for
hundreds of days.
This commit is contained in:
icomrade
2016-09-22 13:26:15 -04:00
parent b315c15cb0
commit 43547c8273

View File

@@ -175,13 +175,9 @@ dayz_objectUID2 = {
_dir = _this select 0;
_key = "";
_position = _this select 1;
if((count _this) == 2) then{
{
_x = _x * 10;
if (_x < 0) then { _x = _x * -10 };
_key = _key + str(round(_x));
} count _position;
_key = _key + str(round(_dir));
if((count _this) == 2) then {
//_key = str(round(diag_tickTime max 1)) + (str(round(abs(_position select 0))) + str(round(abs(_position select 1))) + str(round _dir));
_key = format["%1%2%3%4",(round(diag_tickTime max 1)), (round(abs(_position select 0))), (round(abs(_position select 1))), (round _dir)];
} else {
_vector = [];
_usedVec = false;