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:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user