mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 12:12:34 +03:00
Correct duplicate object UID check
I forgot numbers greater than 1 million are truncated when converted to
string:
http://killzonekid.com/arma-scripting-tutorials-float-to-string-position-to-string/
KeyStartNumber exceeded 6 digits which is why it was being truncated to
"1e+011" and getting stuck on loop (as that string was already in
currentObjectUIDs) as mentioned in 2df7279.
Starting at 10, there should never be more than a couple duplicates
generated, so keyStartNumber will never exceed about 100 max. Added an
exit just for a fail safe.
This commit is contained in:
@@ -555,7 +555,7 @@ if (isServer) then {
|
||||
|
||||
// EPOCH ADDITIONS
|
||||
currentObjectUIDs = [];
|
||||
keyStartNumber = 100000000000;
|
||||
keyStartNumber = 10; // Can not exceed 6 digits. Numbers >= 1 million are truncated when converted to string. i.e. "1e+006"
|
||||
DZE_safeVehicle = ["ParachuteWest","ParachuteC"];
|
||||
if (isNil "EpochUseEvents") then {EpochUseEvents = false;};
|
||||
if (isNil "EpochEvents") then {EpochEvents = [];};
|
||||
|
||||
Reference in New Issue
Block a user