hack synchash to sync the traitdict contents (just ITick impls for now)

This commit is contained in:
Chris Forbes
2010-09-18 18:31:36 +12:00
parent a1fd84fb15
commit 59cc50df4c

View File

@@ -175,9 +175,15 @@ namespace OpenRA
{
int n = 0;
int ret = 0;
// hash all the actors
foreach (var a in Actors)
ret += n++ * (int)a.ActorID * Sync.CalculateSyncHash(a);
// hash all the traits that tick
foreach (var x in traitDict.ActorsWithTraitMultiple<ITick>(this))
ret += n++ * (int)x.Actor.ActorID * Sync.CalculateSyncHash(x.Trait);
return ret;
}
}