diff --git a/1.1/Assemblies/Rimworld-Animations.dll b/1.1/Assemblies/Rimworld-Animations.dll index 488169a..6360d11 100644 Binary files a/1.1/Assemblies/Rimworld-Animations.dll and b/1.1/Assemblies/Rimworld-Animations.dll differ diff --git a/Defs/AnimationDefs/AnimationDefs.rar b/Defs/AnimationDefs/AnimationDefs.rar new file mode 100644 index 0000000..e7bf2a1 Binary files /dev/null and b/Defs/AnimationDefs/AnimationDefs.rar differ diff --git a/Defs/AnimationDefs/Animations_vanilla.xml b/Defs/AnimationDefs/Animations_vanilla.xml index f8e5e1c..f2b94cb 100644 --- a/Defs/AnimationDefs/Animations_vanilla.xml +++ b/Defs/AnimationDefs/Animations_vanilla.xml @@ -463,15 +463,6 @@
  • Oral
  • -
  • - - -
  • Human
  • - - - (0, -0.2) - -
  • Human
  • @@ -483,6 +474,15 @@ (0, 0.2) +
  • + + +
  • Human
  • + + + (0, -0.2) + +
  • @@ -491,6 +491,42 @@ 1140 0 +
  • + LayingPawn + +
  • + 35 + 0 + 0 + 0 + 0.473 + 2 + 2 + 0 + 180 +
  • +
  • + 59 + 0 + 0 + 0.490 + 2 + 2 + -0.003 +
  • +
  • + 1 + 0 + 0 + 0 + 0.473 + 2 + 2 + 0 + 180 +
  • + +
  • @@ -620,120 +656,7 @@
  • -
  • - LayingPawn - -
  • - 35 - 0 - 0 - 0 - 0.473 - 2 - 2 - 0 - 180 -
  • -
  • - 59 - 0 - 0 - 0.490 - 2 - 2 - -0.003 -
  • -
  • - 1 - 0 - 0 - 0 - 0.473 - 2 - 2 - 0 - 180 -
  • - - - - -
  • - Face_Fuck - true - 300 - 0 - -
  • - -
  • - 15 - 0 - 0 - 0 - -0.255 - 0 - 0 - 0 -
  • -
  • - Suck - 14 - 0 - 0 - -0.270 - 0 - 0 - -0.06 -
  • -
  • - 1 - 0 - 0 - 0 - -0.255 - 0 - 0 - 0 -
  • - - -
  • - LayingPawn - -
  • - 15 - 0 - 0 - 0 - 0.473 - 2 - 2 - 0 - 180 -
  • -
  • - 14 - 0 - 0 - 0.575 - 2 - 2 - -0.051 -
  • -
  • - 1 - 0 - 0 - 0 - 0.473 - 2 - 2 - 0 - 180 -
  • - - +
  • @@ -870,6 +793,85 @@
  • +
  • + Face_Fuck + true + 300 + 0 + +
  • + +
  • + 15 + 0 + 0 + 0 + -0.255 + 0 + 0 + 0 +
  • +
  • + Suck + 14 + 0 + 0 + -0.270 + 0 + 0 + -0.06 +
  • +
  • + 1 + 0 + 0 + 0 + -0.255 + 0 + 0 + 0 +
  • + + +
  • + LayingPawn + +
  • + 15 + 0 + 0 + 0 + 0.473 + 2 + 2 + 0 + 180 +
  • +
  • + 14 + 0 + 0 + 0.575 + 2 + 2 + -0.051 +
  • +
  • + 1 + 0 + 0 + 0 + 0.473 + 2 + 2 + 0 + 180 +
  • + + + + +
    @@ -1991,6 +1993,16 @@ +
  • + +
  • Human
  • + + true + true + + (0, -0.2) + +
  • @@ -2004,17 +2016,6 @@
  • -
  • - -
  • Human
  • - - true - true - - (0, -0.2) - - -
    @@ -2024,6 +2025,45 @@ 1340 0 + +
  • + LayingPawn + +
  • + 33 + 180 + 180 + 0 + -0.363 + 2 + 2 + 0 + 0 +
  • +
  • + 33 + 180 + 180 + 0 + -0.313 + 2 + 2 + 0.045 + 0 +
  • +
  • + 1 + 180 + 180 + 0 + -0.363 + 2 + 2 + 0 + 0 +
  • + +
  • @@ -2196,12 +2236,21 @@ 0
  • - + + +
    + +
  • + Fast_Fuck + true + 780 + 0 +
  • LayingPawn
  • - 33 + 13 180 180 0 @@ -2212,7 +2261,7 @@ 0
  • - 33 + 13 180 180 0 @@ -2235,14 +2284,6 @@
  • - - -
  • - Fast_Fuck - true - 780 - 0 -
  • @@ -2278,11 +2319,21 @@
  • + + + +
  • + Cum + true + 594 + 0 + +
  • LayingPawn
  • - 13 + 10 180 180 0 @@ -2293,7 +2344,7 @@ 0
  • - 13 + 10 180 180 0 @@ -2301,7 +2352,88 @@ 2 2 0.045 - 0 +
  • +
  • + 1 + 180 + 180 + 0 + -0.363 + 2 + 2 + 0 +
  • + +
  • + 10 + 180 + 180 + 0 + -0.363 + 2 + 2 + 0 +
  • +
  • + 10 + 180 + 180 + 0 + -0.313 + 2 + 2 + 0.045 +
  • +
  • + 1 + 180 + 180 + 0 + -0.363 + 2 + 2 + 0 +
  • + +
  • + 10 + 180 + 180 + 0 + -0.363 + 2 + 2 + 0 +
  • +
  • + 10 + 180 + 180 + 0 + -0.313 + 2 + 2 + 0.045 +
  • +
  • + 45 + 180 + 180 + 0 + -0.363 + 2 + 2 + 0 +
  • +
  • + 40 + 180 + 180 + 0 + -0.363 + 2 + 2 + 0
  • 1 @@ -2316,14 +2448,6 @@
  • - - -
  • - Cum - true - 594 - 0 -
  • @@ -2445,125 +2569,6 @@
  • -
  • - LayingPawn - -
  • - 10 - 180 - 180 - 0 - -0.363 - 2 - 2 - 0 - 0 -
  • -
  • - 10 - 180 - 180 - 0 - -0.313 - 2 - 2 - 0.045 -
  • -
  • - 1 - 180 - 180 - 0 - -0.363 - 2 - 2 - 0 -
  • - -
  • - 10 - 180 - 180 - 0 - -0.363 - 2 - 2 - 0 -
  • -
  • - 10 - 180 - 180 - 0 - -0.313 - 2 - 2 - 0.045 -
  • -
  • - 1 - 180 - 180 - 0 - -0.363 - 2 - 2 - 0 -
  • - -
  • - 10 - 180 - 180 - 0 - -0.363 - 2 - 2 - 0 -
  • -
  • - 10 - 180 - 180 - 0 - -0.313 - 2 - 2 - 0.045 -
  • -
  • - 45 - 180 - 180 - 0 - -0.363 - 2 - 2 - 0 -
  • -
  • - 40 - 180 - 180 - 0 - -0.363 - 2 - 2 - 0 -
  • -
  • - 1 - 180 - 180 - 0 - -0.363 - 2 - 2 - 0 - 0 -
  • - -
    diff --git a/Source/AnimationUtility.cs b/Source/AnimationUtility.cs index a89c310..44edde4 100644 --- a/Source/AnimationUtility.cs +++ b/Source/AnimationUtility.cs @@ -19,23 +19,26 @@ namespace Rimworld_Animations { //aggressors last participants = participants.OrderBy(p => p.jobs.curDriver is rjw.JobDriver_SexBaseInitiator).ToList(); - //fucked first, fucking second - participants = participants.OrderBy(p => rjw.xxx.can_fuck(p)).ToList(); - - if(rjw.RJWPreferenceSettings.Malesex == rjw.RJWPreferenceSettings.AllowedSex.Nohomo) { - participants = participants.OrderBy(x => rjw.xxx.is_male(x)).ToList(); - } - + //animal anims don't matter who is initiator + participants = participants.OrderBy(p => rjw.xxx.is_animal(p)).ToList(); List localParticipants = new List(participants); IEnumerable options = DefDatabase.AllDefs.Where((AnimationDef x) => { + + if (x.actors.Count != localParticipants.Count) { return false; } for (int i = 0; i < x.actors.Count; i++) { - if((x.actors[i].blacklistedRaces != null) && x.actors[i].blacklistedRaces.Contains(localParticipants[i].def.defName)) { + if (rjw.RJWPreferenceSettings.Malesex == rjw.RJWPreferenceSettings.AllowedSex.Nohomo) { + if (rjw.xxx.is_male(localParticipants[i]) && x.actors[i].isFucked) { + return false; + } + } + + if ((x.actors[i].blacklistedRaces != null) && x.actors[i].blacklistedRaces.Contains(localParticipants[i].def.defName)) { if (rjw.RJWSettings.DevMode) { Log.Message(x.defName.ToStringSafe() + " not selected -- " + localParticipants[i].def.defName.ToStringSafe() + " " + localParticipants[i].Name.ToStringSafe() + " is blacklisted"); } diff --git a/Source/Comps/CompBodyAnimator.cs b/Source/Comps/CompBodyAnimator.cs index 3de585c..b9bfc0f 100644 --- a/Source/Comps/CompBodyAnimator.cs +++ b/Source/Comps/CompBodyAnimator.cs @@ -38,6 +38,8 @@ namespace Rimworld_Animations { private bool mirror = false, quiver = false, shiver = false; private int actor; + private int lastDrawFrame = -1; + private int animTicks = 0, stageTicks = 0, clipTicks = 0; private int curStage = 0; private float clipPercent = 0; @@ -259,6 +261,10 @@ namespace Rimworld_Animations { public void calculateDrawValues() { + if(Find.TickManager.TickRateMultiplier > 1 && (lastDrawFrame + 1 >= RealTime.frameCount || RealTime.deltaTime < 0.05f)) { + return; + } + deltaPos = new Vector3(clip.BodyOffsetX.Evaluate(clipPercent) * (mirror ? -1 : 1), clip.layer.AltitudeFor(), clip.BodyOffsetZ.Evaluate(clipPercent)); if (AnimationSettings.offsets != null && AnimationSettings.offsets.ContainsKey(CurrentAnimation.defName + pawn.def.defName + ActorIndex)) { @@ -307,6 +313,8 @@ namespace Rimworld_Animations { } headBob = new Vector3(0, 0, clip.HeadBob.Evaluate(clipPercent)); + lastDrawFrame = RealTime.frameCount; + } public Vector3 getPawnHeadPosition() { diff --git a/Source/Patches/HarmonyPatch_AlienRace.cs b/Source/Patches/HarmonyPatch_AlienRace.cs index 55a0bde..80198b6 100644 --- a/Source/Patches/HarmonyPatch_AlienRace.cs +++ b/Source/Patches/HarmonyPatch_AlienRace.cs @@ -77,10 +77,8 @@ namespace Rimworld_Animations { - Vector2 bodyOffset = (portrait ? offset?.portraitBodyTypes ?? offset?.bodyTypes : offset?.bodyTypes)?.FirstOrDefault(predicate: to => to.bodyType == pawn.story.bodyType) - ?.offset ?? Vector2.zero; - Vector2 crownOffset = (portrait ? offset?.portraitCrownTypes ?? offset?.crownTypes : offset?.crownTypes)?.FirstOrDefault(predicate: to => to.crownType == alienComp.crownType) - ?.offset ?? Vector2.zero; + Vector2 bodyOffset = ((!portrait) ? offset?.bodyTypes : (offset?.portraitBodyTypes ?? offset?.bodyTypes))?.FirstOrDefault((AlienPartGenerator.BodyTypeOffset to) => to.bodyType == pawn.story.bodyType)?.offset ?? Vector2.zero; + Vector2 crownOffset = ((!portrait) ? offset?.crownTypes : (offset?.portraitCrownTypes ?? offset?.crownTypes))?.FirstOrDefault((AlienPartGenerator.CrownTypeOffset to) => to.crownType == alienComp.crownType)?.offset ?? Vector2.zero; //Defaults for tails //south 0.42f, -0.3f, -0.22f