mirror of
				https://gitgud.io/c0ffeeeeeeee/rimworld-animations.git
				synced 2024-08-15 00:43:45 +00:00 
			
		
		
		
	Replace HarmonyPatch_PawnRenderer.cs
This commit is contained in:
		
							parent
							
								
									c08601b81f
								
							
						
					
					
						commit
						37f7f3c0ef
					
				
					 1 changed files with 11 additions and 10 deletions
				
			
		| 
						 | 
					@ -1,8 +1,6 @@
 | 
				
			||||||
using System;
 | 
					using System;
 | 
				
			||||||
using System.Collections.Generic;
 | 
					using System.Collections.Generic;
 | 
				
			||||||
using System.Linq;
 | 
					using System.Linq;
 | 
				
			||||||
using System.Text;
 | 
					 | 
				
			||||||
using System.Threading.Tasks;
 | 
					 | 
				
			||||||
using HarmonyLib;
 | 
					using HarmonyLib;
 | 
				
			||||||
using RimWorld;
 | 
					using RimWorld;
 | 
				
			||||||
using Verse;
 | 
					using Verse;
 | 
				
			||||||
| 
						 | 
					@ -66,18 +64,21 @@ namespace Rimworld_Animations {
 | 
				
			||||||
					//headFacing equals true
 | 
										//headFacing equals true
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
									// Fixes the offsets for eye implants and wounds on the head during animations
 | 
				
			||||||
 | 
									else if (ins[i].opcode == OpCodes.Callvirt && ins[i].operand != null && ins[i].OperandIs(AccessTools.DeclaredMethod(typeof(PawnWoundDrawer), "RenderOverBody")))
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										// Pass some additional info to a new overload of RenderOverBody
 | 
				
			||||||
 | 
										yield return new CodeInstruction(OpCodes.Ldarg_0);
 | 
				
			||||||
 | 
										yield return new CodeInstruction(OpCodes.Ldfld, AccessTools.DeclaredField(typeof(PawnRenderer), "pawn"));
 | 
				
			||||||
 | 
										yield return new CodeInstruction(OpCodes.Ldarg_S, (object)6); // renderer flags
 | 
				
			||||||
 | 
										yield return new CodeInstruction(OpCodes.Call, AccessTools.DeclaredMethod(typeof(PawnWoundDrawerExtension), "RenderOverBody"));
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				else
 | 
									else
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
					yield return ins[i];
 | 
										yield return ins[i];
 | 
				
			||||||
				}								
 | 
									}								
 | 
				
			||||||
				
 | 
					 | 
				
			||||||
				
 | 
					 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					 | 
				
			||||||
	
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue