🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗
Click here to enter!
lets say we have a trigger that takes a player name and returns player id by looking it up from the hashtable. lets say we got 2 unlucky players A and B.
these players got different names but StringHash(GetPlayerName(A)) == StringHash(GetPlayerName(A))
thus if we get the name of player A from somewhere and look it up in the hashtable we might in stead get player B (because that was added last and overrode the original entry)
the main issue is that hashtables don't use the actual string as a key but the hash of the string. unless you specifically test for conflicts you will never know that 2 entries collide and the earlier one gets trampled and overwritten.
.....