mirror of
				https://gitgud.io/c0ffeeeeeeee/rimworld-animations.git
				synced 2024-08-15 00:43:45 +00:00 
			
		
		
		
	don't run passthrough while not animating
This commit is contained in:
		
							parent
							
								
									f3cd391c6f
								
							
						
					
					
						commit
						67cb546336
					
				
					 3 changed files with 2 additions and 1 deletions
				
			
		
										
											Binary file not shown.
										
									
								
							| 
						 | 
					@ -10,6 +10,7 @@ namespace Rimworld_Animations {
 | 
				
			||||||
        public List<ThingKeyframe> keyframes;
 | 
					        public List<ThingKeyframe> keyframes;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        public override void buildSimpleCurves() {
 | 
					        public override void buildSimpleCurves() {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -41,7 +41,7 @@ namespace Rimworld_Animations {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		public static bool Prefix_AnimateHeadAddons(bool portrait, Vector3 vector, Pawn pawn, Quaternion quat, Rot4 rotation, bool invisible) {
 | 
							public static bool Prefix_AnimateHeadAddons(bool portrait, Vector3 vector, Pawn pawn, Quaternion quat, Rot4 rotation, bool invisible) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			if (portrait) return true;
 | 
								if (portrait || pawn.TryGetComp<CompBodyAnimator>() == null || !pawn.TryGetComp<CompBodyAnimator>().isAnimating) return true;
 | 
				
			||||||
			if (!(pawn.def is ThingDef_AlienRace alienProps) || invisible) return false;
 | 
								if (!(pawn.def is ThingDef_AlienRace alienProps) || invisible) return false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			List<AlienPartGenerator.BodyAddon> addons = alienProps.alienRace.generalSettings.alienPartGenerator.bodyAddons;
 | 
								List<AlienPartGenerator.BodyAddon> addons = alienProps.alienRace.generalSettings.alienPartGenerator.bodyAddons;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue