only bother hashing traits that have ISync

This commit is contained in:
Chris Forbes
2011-01-26 10:05:44 +13:00
committed by Paul Chote
parent f52620f6fc
commit 180d58c35a
2 changed files with 2 additions and 2 deletions

View File

@@ -195,7 +195,7 @@ namespace OpenRA
ret += n++ * (int)(1+a.ActorID) * Sync.CalculateSyncHash(a);
// hash all the traits that tick
foreach (var x in traitDict.ActorsWithTraitMultiple<object>(this))
foreach (var x in traitDict.ActorsWithTraitMultiple<ISync>(this))
ret += n++*(int) (1+x.Actor.ActorID)*Sync.CalculateSyncHash(x.Trait);
// Hash the shared rng