Skip to content

Commit

Permalink
Merge pull request #61 from The-any-Key/Hash_bugfix
Browse files Browse the repository at this point in the history
Fixed hash bug
  • Loading branch information
The-any-Key authored Nov 11, 2017
2 parents 18a8189 + 40bfad8 commit 56ed440
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
12 changes: 11 additions & 1 deletion GMnetENGINE.gmx/scripts/htme_hash.gml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,17 @@
**
*/
var str = "";
for (var i=0;i<8;i++) {
for (var i=0;i<6;i++) {
str = str+chr(random_range(48,122));
}
// Add counter and player number to hash, to make it unique
if global.htme_object.playerhash!=""
{
str+=string(global.htme_object.hash_counter)+string(htme_getPlayerNumber(global.htme_object.playerhash));
}
else
{
// When generating player hash ignore use player number
str+=string(global.htme_object.hash_counter);
}
return str;
1 change: 1 addition & 0 deletions GMnetENGINE.gmx/scripts/htme_init.gml
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ self.lan_intervalpnt = self.lan_interval;
self.serverEventHandlerConnect = htme_defaultEventHandler;
self.serverEventHandlerDisconnect = htme_defaultEventHandler;
self.chatQueues = -1;
self.hash_counter = 1;
//Signed Packet Count Map - Sending
/*STRUCTURE:
self.sPcountOUT ->
Expand Down

0 comments on commit 56ed440

Please sign in to comment.