pre-1.3 update WIP

This commit is contained in:
c0ffee 2021-07-21 12:24:23 -07:00
parent 7c2151fd76
commit 6d4ed2a9e3
14 changed files with 190 additions and 107 deletions

View file

@ -32,7 +32,6 @@ namespace Rimworld_Animations {
actorsInCurrentAnimation = null;
}
PortraitsCache.SetDirty(pawn);
}
}
private bool Animating = false;
@ -179,6 +178,9 @@ namespace Rimworld_Animations {
base.CompTick();
if(isAnimating) {
GlobalTextureAtlasManager.TryMarkPawnFrameSetDirty(pawn);
if (pawn.Dead || pawn?.jobs?.curDriver == null || (pawn?.jobs?.curDriver != null && !(pawn?.jobs?.curDriver is rjw.JobDriver_Sex))) {
isAnimating = false;
}
@ -187,7 +189,7 @@ namespace Rimworld_Animations {
}
}
}
public void animatePawn(ref Vector3 rootLoc, ref float angle, ref Rot4 bodyFacing, ref Rot4 headFacing) {
public void animatePawnBody(ref Vector3 rootLoc, ref float angle, ref Rot4 bodyFacing) {
if(!isAnimating) {
return;
@ -195,19 +197,23 @@ namespace Rimworld_Animations {
rootLoc = anchor + deltaPos;
angle = bodyAngle;
bodyFacing = this.bodyFacing;
headFacing = this.headFacing;
}
public Rot4 AnimateHeadFacing()
{
return this.headFacing;
}
public void tickGraphics(PawnGraphicSet graphics) {
this.Graphics = graphics;
}
public void tickAnim() {
if (!isAnimating) return;
if (anim == null) {
@ -231,6 +237,9 @@ namespace Rimworld_Animations {
}
}
public void tickStage()