diff --git a/SQF/dayz_server/init/server_functions.sqf b/SQF/dayz_server/init/server_functions.sqf index b474ae4d5..1266f56c8 100644 --- a/SQF/dayz_server/init/server_functions.sqf +++ b/SQF/dayz_server/init/server_functions.sqf @@ -169,19 +169,16 @@ server_getDiff2 = { _result }; -// 1.8.7 dayz_objectUID2 seems to generate keys that are too long for Epoch hive. Keep old method for now. +//seems max is 19 digits dayz_objectUID2 = { - private["_position","_dir","_key","_element","_vector","_set","_vecCnt","_usedVec"]; + private["_position","_dir","_time" ,"_key"]; _dir = _this select 0; + _time = round diag_tickTime; + if (_time > 99999) then {_time = round(random 99999);}; //prevent overflow if server isn't restarted _key = ""; _position = _this select 1; - 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%5",(round(diag_tickTime max 1)), (round(abs(_position select 0))), (round(abs(_position select 1))), (round _dir), (round (random(diag_tickTime max 1)))]; - } else { - _key = format["%1%2%3%4%5%6",(round(diag_tickTime max 1)), (round(abs(_position select 0))), (round(abs(_position select 1))), (round(abs(_position select 2))), (round _dir), (round (random(diag_tickTime max 1)))]; - }; - _key + _key = format["%1%2%3%4", round(_time + abs(_position select 0)), round(_dir), round(abs(_position select 1)), _time]; + _key; }; dayz_recordLogin = { diff --git a/Server Files/SQL/1.0.6_Updates.sql b/Server Files/SQL/1.0.6_Updates.sql index 44866c4bc..75cff846d 100644 --- a/Server Files/SQL/1.0.6_Updates.sql +++ b/Server Files/SQL/1.0.6_Updates.sql @@ -15,7 +15,6 @@ ALTER TABLE `Object_DATA` CHANGE `Hitpoints` `Hitpoints` VARCHAR(1024) CHARACTER -- Update Object_DATA to support longer CharacterID and hitpoints -- ---------------------------- ALTER TABLE Object_DATA MODIFY COLUMN CharacterID bigint(20); -ALTER TABLE Object_DATA MODIFY COLUMN ObjectUID varchar(64); ALTER TABLE Object_DATA MODIFY COLUMN Hitpoints varchar(1024); -- ---------------------------- diff --git a/Server Files/SQL/epoch.sql b/Server Files/SQL/epoch.sql index 61c35212d..21502564e 100644 --- a/Server Files/SQL/epoch.sql +++ b/Server Files/SQL/epoch.sql @@ -50,7 +50,7 @@ CREATE TABLE IF NOT EXISTS `Character_DATA` ( -- ---------------------------- CREATE TABLE IF NOT EXISTS `Object_DATA` ( `ObjectID` int(11) unsigned NOT NULL AUTO_INCREMENT, - `ObjectUID` varchar(64) NOT NULL DEFAULT '0', + `ObjectUID` bigint(24) NOT NULL DEFAULT '0', `Instance` int(11) unsigned NOT NULL, `Classname` varchar(50) DEFAULT NULL, `Datestamp` datetime NOT NULL,