mirror of
				https://gitgud.io/c0ffeeeeeeee/rimworld-animations.git
				synced 2024-08-15 00:43:45 +00:00 
			
		
		
		
	Bugfixes
This commit is contained in:
		
							parent
							
								
									df7623a856
								
							
						
					
					
						commit
						b04afef7b1
					
				
					 4 changed files with 10 additions and 9 deletions
				
			
		
										
											Binary file not shown.
										
									
								
							| 
						 | 
				
			
			@ -118,7 +118,7 @@ namespace Rimworld_Animations {
 | 
			
		|||
                tickAnim();
 | 
			
		||||
 | 
			
		||||
                if (pawn?.jobs?.curDriver == null || (pawn?.jobs?.curDriver != null && !(pawn?.jobs?.curDriver is rjw.JobDriver_Sex))) {
 | 
			
		||||
                    Animating = false;
 | 
			
		||||
                    isAnimating = false;
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -31,7 +31,7 @@ namespace Rimworld_Animations {
 | 
			
		|||
 | 
			
		||||
			CompBodyAnimator bodyAnim = ___pawn.TryGetComp<CompBodyAnimator>();
 | 
			
		||||
 | 
			
		||||
			if (bodyAnim.isAnimating && !portrait) {
 | 
			
		||||
			if (bodyAnim != null && bodyAnim.isAnimating && !portrait) {
 | 
			
		||||
 | 
			
		||||
				headFacing = bodyAnim.headFacing;
 | 
			
		||||
				headOrigin = new Vector3(bodyAnim.getPawnHeadPosition().x, headOrigin.y, bodyAnim.getPawnHeadPosition().z);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -68,12 +68,18 @@ namespace Rimworld_Animations {
 | 
			
		|||
				Log.Message("Now playing " + anim.defName);
 | 
			
		||||
 | 
			
		||||
				bool mirror = GenTicks.TicksGame % 2 == 0;
 | 
			
		||||
 | 
			
		||||
				IntVec3 pos = pawn.Position;
 | 
			
		||||
 | 
			
		||||
				for (int i = 0; i < pawnsToAnimate.Count; i++) {
 | 
			
		||||
 | 
			
		||||
					if (bed != null)
 | 
			
		||||
						pawnsToAnimate[i].TryGetComp<CompBodyAnimator>().setAnchor(bed);
 | 
			
		||||
					else
 | 
			
		||||
						pawnsToAnimate[i].TryGetComp<CompBodyAnimator>().setAnchor(pawn);
 | 
			
		||||
					else {
 | 
			
		||||
 | 
			
		||||
						pawnsToAnimate[i].TryGetComp<CompBodyAnimator>().setAnchor(pos);
 | 
			
		||||
					}
 | 
			
		||||
						
 | 
			
		||||
 | 
			
		||||
					pawnsToAnimate[i].TryGetComp<CompBodyAnimator>().StartAnimation(anim, i, mirror);
 | 
			
		||||
					(pawnsToAnimate[i].jobs.curDriver as JobDriver_Sex).ticks_left = anim.animationTimeTicks;
 | 
			
		||||
| 
						 | 
				
			
			@ -112,11 +118,6 @@ namespace Rimworld_Animations {
 | 
			
		|||
						if (!((parteners[i].jobs.curDriver as JobDriver_SexBaseInitiator) != null && (parteners[i].jobs.curDriver as JobDriver_SexBaseInitiator).Target != __instance.pawn))
 | 
			
		||||
							parteners[i].TryGetComp<CompBodyAnimator>().isAnimating = false;
 | 
			
		||||
 | 
			
		||||
						if (xxx.is_human(parteners[i])) {
 | 
			
		||||
							parteners[i].Drawer.renderer.graphics.ResolveApparelGraphics();
 | 
			
		||||
							PortraitsCache.SetDirty(parteners[i]);
 | 
			
		||||
						}
 | 
			
		||||
 | 
			
		||||
					}
 | 
			
		||||
 | 
			
		||||
					__instance.Target.TryGetComp<CompBodyAnimator>().isAnimating = false;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue