hack synchash to sync the traitdict contents (just ITick impls for now)
This commit is contained in:
@@ -175,9 +175,15 @@ namespace OpenRA
|
|||||||
{
|
{
|
||||||
int n = 0;
|
int n = 0;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
|
// 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)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;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user