small tweak to make events work better

This commit is contained in:
c0ffee 2021-04-12 00:51:01 -07:00
parent a940108cc3
commit f9db629082
2 changed files with 11 additions and 0 deletions

View File

@ -92,6 +92,17 @@ namespace Rimworld_Animations {
IntVec3 pos = pawn.Position;
Log.Message("Pawns count:" + pawnsToAnimate.Count + "Selected Anims Count: " + anim.actors.Count);
if(pawnsToAnimate.Count > anim.actors.Count)
{
Log.Warning("Too many pawns for this anim. Stopping other actors...");
for(int i = anim.actors.Count; i < pawnsToAnimate.Count; i++)
{
pawnsToAnimate[i].TryGetComp<CompBodyAnimator>().isAnimating = false;
}
}
for (int i = 0; i < pawnsToAnimate.Count; i++) {
if (bed != null)