From 439bb7d02fc6a66882e71792328efd799df415a7 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Mon, 27 Dec 2010 14:28:03 +1300 Subject: [PATCH] multiplying by 0 makes the world hard to sync --- OpenRA.Game/World.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenRA.Game/World.cs b/OpenRA.Game/World.cs index b0068a4a2b..5f2cdd7a63 100644 --- a/OpenRA.Game/World.cs +++ b/OpenRA.Game/World.cs @@ -198,11 +198,11 @@ namespace OpenRA // hash all the 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 foreach (var x in traitDict.ActorsWithTraitMultiple(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 ret += SharedRandom.Last;