multiplying by 0 makes the world hard to sync

This commit is contained in:
Chris Forbes
2010-12-27 14:28:03 +13:00
parent 9ad23b10f0
commit 439bb7d02f

View File

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