Identify players by a unique ID and no more by their name, so that when you rename a player game slots are no longer so confused. This is a somewhat painful change, please report any breakage

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11146 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria
2012-04-24 01:28:43 +00:00
parent 8a919816e1
commit 7e5f51b270
11 changed files with 112 additions and 35 deletions
+12
View File
@@ -620,6 +620,18 @@ namespace StringUtils
return output.str();
} // encodeToHtmlEntities
// ------------------------------------------------------------------------
unsigned int simpleHash(const char* input)
{
int hash = 0;
for (int n=0; input[n] != 0; n++)
{
hash += (hash << (hash & 0xF)) ^ input[n];
}
return hash;
}
} // namespace StringUtils