diff --git a/GMnetENGINE.gmx/scripts/htme_hash.gml b/GMnetENGINE.gmx/scripts/htme_hash.gml index da2441c..36850f6 100644 --- a/GMnetENGINE.gmx/scripts/htme_hash.gml +++ b/GMnetENGINE.gmx/scripts/htme_hash.gml @@ -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; diff --git a/GMnetENGINE.gmx/scripts/htme_init.gml b/GMnetENGINE.gmx/scripts/htme_init.gml index 920881a..c68708d 100644 --- a/GMnetENGINE.gmx/scripts/htme_init.gml +++ b/GMnetENGINE.gmx/scripts/htme_init.gml @@ -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 ->