mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Resize volume layers (#323)
I tried a lot of ways to do this but only this one worked so here you go I guess.
This commit is contained in:
commit
8da6b1d284
29
NewHorizons/Patches/ShapePatches.cs
Normal file
29
NewHorizons/Patches/ShapePatches.cs
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
using HarmonyLib;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace NewHorizons.Patches
|
||||||
|
{
|
||||||
|
[HarmonyPatch]
|
||||||
|
public class ShapePatches
|
||||||
|
{
|
||||||
|
[HarmonyPrefix]
|
||||||
|
[HarmonyPatch(typeof(ShapeManager), nameof(ShapeManager.Initialize))]
|
||||||
|
public static bool ShapeManager_Initialize()
|
||||||
|
{
|
||||||
|
ShapeManager._exists = true;
|
||||||
|
|
||||||
|
ShapeManager._detectors = new ShapeManager.Layer(256);
|
||||||
|
for (int index = 0; index < 256; ++index)
|
||||||
|
ShapeManager._detectors[index].contacts = new List<ShapeManager.ContactData>(64);
|
||||||
|
|
||||||
|
ShapeManager._volumes = new ShapeManager.Layer[4];
|
||||||
|
for (int index = 0; index < 4; ++index)
|
||||||
|
ShapeManager._volumes[index] = new ShapeManager.Layer(2048);
|
||||||
|
|
||||||
|
ShapeManager._locked = false;
|
||||||
|
ShapeManager._frameFlag = false;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user