- Fixed an issue with the orgasm not filling in some circumstances
- Fixed a bug with sex overdrive not applying correctly
- Fixed an issue with 'on orgasm' events not triggering correctly
This commit is contained in:
AbstractConcept 2023-02-08 23:32:58 -06:00
parent cce0053fd6
commit 003b67fb97
14 changed files with 92 additions and 102 deletions

View file

@ -105,9 +105,37 @@ namespace Rimworld_Animations_Patch
{ participants.AddDistinct(partner); }
}
participants.AddDistinct(pawn);
participants.SortBy(x => x.GetAnimationData() != null ? x.GetAnimationData().actorID : participants.IndexOf(x));
participants.AddDistinct(pawn);
// Sort participants according to actorID, if they have one
Dictionary<int, Pawn> _participants = new Dictionary<int, Pawn>();
int c = 99;
foreach (Pawn participant in participants)
{
ActorAnimationData data = pawn.GetAnimationData();
if (data != null)
{
int idx = data.actorID;
if (_participants.ContainsKey(data.actorID))
{ DebugMode.Message("ERROR: Somehow you ended up with two actors with the same actorID"); idx = ++c; }
_participants.Add(idx, participant);
}
else
{ _participants.Add(++c, participant); }
}
participants = _participants.Values.ToList();
//ActorAnimationData data = pawn.GetAnimationData();
//if (data != null)
//participants.SortBy(x => x.GetAnimationData() != null ? x.GetAnimationData().actorID : participants.IndexOf(x));
return participants;
}