Stabilize RimWorld 1.6 caches and tick optimizations
This commit is contained in:
@@ -15,6 +15,8 @@ public sealed class PawnRenderingOptimizations : ClassWithFishPrepatches
|
||||
|
||||
public sealed class IsHiddenFromPlayerPatch : FishPrepatch
|
||||
{
|
||||
public override bool DefaultState => true;
|
||||
|
||||
// not 100% on this even benefitting, bionics, scars, etc likely worsen performance here because of the extra check
|
||||
// probably better to just track if a hediff adds invisibility
|
||||
public override string? Description { get; }
|
||||
@@ -53,6 +55,8 @@ public sealed class PawnRenderingOptimizations : ClassWithFishPrepatches
|
||||
|
||||
public sealed class PawnRenderTreeComputeMatrixPatch : FishPrepatch
|
||||
{
|
||||
public override bool DefaultState => true;
|
||||
|
||||
public override string? Description { get; }
|
||||
= "Avoids Matrix4x4 inverse work when undoing a pivot translation in PawnRenderTree.ComputeMatrix.";
|
||||
|
||||
@@ -85,6 +89,8 @@ public sealed class PawnRenderingOptimizations : ClassWithFishPrepatches
|
||||
|
||||
public sealed class DamageFlasherCurColorPatch : FishPrepatch
|
||||
{
|
||||
public override bool DefaultState => true;
|
||||
|
||||
private static readonly AccessTools.FieldRef<DamageFlasher, int> _lastDamageTick
|
||||
= AccessTools.FieldRefAccess<DamageFlasher, int>("lastDamageTick");
|
||||
|
||||
@@ -110,6 +116,8 @@ public sealed class PawnRenderingOptimizations : ClassWithFishPrepatches
|
||||
|
||||
public sealed class DamageFlasherGetDamagedMatPatch : FishPrepatch
|
||||
{
|
||||
public override bool DefaultState => true;
|
||||
|
||||
private static readonly AccessTools.FieldRef<DamageFlasher, int> _lastDamageTick
|
||||
= AccessTools.FieldRefAccess<DamageFlasher, int>("lastDamageTick");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user