Fix shroud hash updating. Fixes #6308.

This ensures that multiple Invalidations() in one tick will each update the shroud rendering.
This commit is contained in:
Paul Chote
2014-08-23 15:19:34 +12:00
parent 6fcd4c3605
commit 531e3cfaf3

View File

@@ -71,7 +71,12 @@ namespace OpenRA.Traits
void Invalidate()
{
var oldHash = Hash;
Hash = Sync.hash_player(self.Owner) + self.World.WorldTick * 3;
// Invalidate may be called multiple times in one world tick, which is decoupled from rendering.
if (oldHash == Hash)
Hash += 1;
}
static IEnumerable<CPos> FindVisibleTiles(World world, CPos position, WRange radius)