Revert the last two commits

This reverts commits b5f3f30 and 3e0ddef.

Discussed with oiad on discord:
- BIS_fnc_areEqual is much slower than short string comparisons
- String in array form is three times longer, which means more data sent over the network

This way keeps authKey as a string and still avoids pvval kicks.
This commit is contained in:
ebayShopper
2018-01-21 13:54:20 -05:00
parent 3e0ddef7b1
commit d48c9070e8
4 changed files with 8 additions and 7 deletions

View File

@@ -217,10 +217,10 @@ _playerObj setVariable ["lastPos",getPosATL _playerObj];
_clientID = owner _playerObj;
_randomKey = [];
_randomInput = toArray "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890!@#$^*";
for "_i" from 0 to 12 do {
_randomKey set [count _randomKey, (_randomInput call BIS_fnc_selectRandom)];
_randomKey set [_i, (ceil(random 128)) + 256]; //Latin Extended-A characters not filtered in publicvariableval.txt
};
_randomKey = toString _randomKey;
_findIndex = dayz_serverPUIDArray find _playerID;
if (_findIndex > -1) then {
dayz_serverClientKeys set [_findIndex, [_clientID,_randomKey]];