示例#1
0
        static bool Prefix(Pawn ___pawn, ref bool __result, ref PawnGraphicSet __instance, ref int ___cachedMatsBodyBaseHash)
        {
            Pawn pawn = ___pawn;

            if (!pawn.HasTerrainMovementPawnKindGraphicsExtension())
            {
                return(true);
            }
            StatDef moveStat = StatDefOf.MoveSpeed;

            if (!pawn.Dead)
            {
                moveStat = pawn.BestTerrainMoveStat();
            }
            TerrainMovementPawnKindGraphics graphicsExt = pawn.LoadTerrainMovementPawnKindGraphicsExtension(moveStat);

            __result = __instance.CalculateGraphicsHash(graphicsExt, pawn.Rotation, pawn.CurRotDrawMode()) == ___cachedMatsBodyBaseHash;
            return(false);
        }