Skip to content

Commit 3a16d32

Browse files
committed
Overhead DefModExt temp disabled
1 parent 52dcb36 commit 3a16d32

6 files changed

Lines changed: 56 additions & 56 deletions

File tree

Assemblies/O21Toolbox.dll

-1 KB
Binary file not shown.
-512 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.

Source/O21Toolbox/O21Toolbox/Harmony/HarmonyPatches.cs

Lines changed: 56 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -883,62 +883,62 @@ public static Pawn Pawn_InteractionsTracker_GetPawn(Pawn_InteractionsTracker ins
883883

884884
#region ApparelPatches
885885

886-
public static void RenderPawnInternalPostfix(PawnRenderer __instance, Vector3 rootLoc, float angle, bool renderBody, Rot4 bodyFacing, Rot4 headFacing, RotDrawMode bodyDrawType, bool portrait, bool headStump)
887-
{
888-
if (!__instance.graphics.pawn.RaceProps.Animal)
889-
{
890-
List<ApparelGraphicRecord> offsetApparelList = new List<ApparelGraphicRecord>();
891-
// Get all apparel with the defModExt.
892-
foreach(Apparel ap in __instance.graphics.pawn.apparel.WornApparel)
893-
{
894-
ApparelGraphicRecord item;
895-
if (ap.def.HasModExtension<DefModExt_HeadwearOffset>())
896-
{
897-
DefModExt_HeadwearOffset modExt = ap.def.GetModExtension<DefModExt_HeadwearOffset>();
898-
if (TryGetGraphicApparelSpecial(ap, __instance.graphics.pawn.story.bodyType, modExt, out item))
899-
{
900-
offsetApparelList.Add(item);
901-
}
902-
}
903-
}
904-
905-
// Render if any Apparel in the list and NOT an animal.
906-
if (offsetApparelList.Count >= 1)
907-
{
908-
Quaternion quaternion = Quaternion.AngleAxis(angle, Vector3.up);
909-
for (int i = 0; i < offsetApparelList.Count; i++)
910-
{
911-
DefModExt_HeadwearOffset modExt = offsetApparelList[i].sourceApparel.def.GetModExtension<DefModExt_HeadwearOffset>();
912-
Vector3 baseOffset = quaternion * modExt.offset;
913-
Mesh mesh = __instance.graphics.HairMeshSet.MeshAt(headFacing);
914-
Vector3 loc2 = rootLoc + baseOffset;
915-
loc2.y += 0.03125f;
916-
917-
if (modExt.bodyDependant)
918-
{
919-
920-
}
921-
else
922-
{
923-
if (!offsetApparelList[i].sourceApparel.def.apparel.hatRenderedFrontOfFace)
924-
{
925-
Material material2 = offsetApparelList[i].graphic.MatAt(bodyFacing, null);
926-
material2 = __instance.graphics.flasher.GetDamagedMat(material2);
927-
GenDraw.DrawMeshNowOrLater(mesh, loc2, quaternion, material2, portrait);
928-
}
929-
else
930-
{
931-
Material material3 = offsetApparelList[i].graphic.MatAt(bodyFacing, null);
932-
material3 = __instance.graphics.flasher.GetDamagedMat(material3);
933-
Vector3 loc3 = rootLoc + baseOffset;
934-
loc3.y += ((!(bodyFacing == Rot4.North)) ? 0.03515625f : 0.00390625f);
935-
GenDraw.DrawMeshNowOrLater(mesh, loc3, quaternion, material3, portrait);
936-
}
937-
}
938-
}
939-
}
940-
}
941-
}
886+
//public static void RenderPawnInternalPostfix(PawnRenderer __instance, Vector3 rootLoc, float angle, bool renderBody, Rot4 bodyFacing, Rot4 headFacing, RotDrawMode bodyDrawType, bool portrait, bool headStump)
887+
//{
888+
// if (!__instance.graphics.pawn.RaceProps.Animal)
889+
// {
890+
// List<ApparelGraphicRecord> offsetApparelList = new List<ApparelGraphicRecord>();
891+
// // Get all apparel with the defModExt.
892+
// foreach(Apparel ap in __instance.graphics.pawn.apparel.WornApparel)
893+
// {
894+
// ApparelGraphicRecord item;
895+
// if (ap.def.HasModExtension<DefModExt_HeadwearOffset>())
896+
// {
897+
// DefModExt_HeadwearOffset modExt = ap.def.GetModExtension<DefModExt_HeadwearOffset>();
898+
// if (TryGetGraphicApparelSpecial(ap, __instance.graphics.pawn.story.bodyType, modExt, out item))
899+
// {
900+
// offsetApparelList.Add(item);
901+
// }
902+
// }
903+
// }
904+
905+
// // Render if any Apparel in the list and NOT an animal.
906+
// if (offsetApparelList.Count >= 1)
907+
// {
908+
// Quaternion quaternion = Quaternion.AngleAxis(angle, Vector3.up);
909+
// for (int i = 0; i < offsetApparelList.Count; i++)
910+
// {
911+
// DefModExt_HeadwearOffset modExt = offsetApparelList[i].sourceApparel.def.GetModExtension<DefModExt_HeadwearOffset>();
912+
// Vector3 baseOffset = quaternion * modExt.offset;
913+
// Mesh mesh = __instance.graphics.HairMeshSet.MeshAt(headFacing);
914+
// Vector3 loc2 = rootLoc + baseOffset;
915+
// loc2.y += 0.03125f;
916+
917+
// if (modExt.bodyDependant)
918+
// {
919+
920+
// }
921+
// else
922+
// {
923+
// if (!offsetApparelList[i].sourceApparel.def.apparel.hatRenderedFrontOfFace)
924+
// {
925+
// Material material2 = offsetApparelList[i].graphic.MatAt(bodyFacing, null);
926+
// material2 = __instance.graphics.flasher.GetDamagedMat(material2);
927+
// GenDraw.DrawMeshNowOrLater(mesh, loc2, quaternion, material2, portrait);
928+
// }
929+
// else
930+
// {
931+
// Material material3 = offsetApparelList[i].graphic.MatAt(bodyFacing, null);
932+
// material3 = __instance.graphics.flasher.GetDamagedMat(material3);
933+
// Vector3 loc3 = rootLoc + baseOffset;
934+
// loc3.y += ((!(bodyFacing == Rot4.North)) ? 0.03515625f : 0.00390625f);
935+
// GenDraw.DrawMeshNowOrLater(mesh, loc3, quaternion, material3, portrait);
936+
// }
937+
// }
938+
// }
939+
// }
940+
// }
941+
//}
942942

943943
private static bool TryGetGraphicApparelSpecial(Apparel apparel, BodyTypeDef bodyType, DefModExt_HeadwearOffset modExt, out ApparelGraphicRecord rec)
944944
{
-1 KB
Binary file not shown.

0 commit comments

Comments
 (0)