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:
@@ -71,7 +71,12 @@ namespace OpenRA.Traits
|
|||||||
|
|
||||||
void Invalidate()
|
void Invalidate()
|
||||||
{
|
{
|
||||||
|
var oldHash = Hash;
|
||||||
Hash = Sync.hash_player(self.Owner) + self.World.WorldTick * 3;
|
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)
|
static IEnumerable<CPos> FindVisibleTiles(World world, CPos position, WRange radius)
|
||||||
|
|||||||
Reference in New Issue
Block a user