This commit is contained in:
JohnCorby 2022-07-30 12:00:27 -07:00
parent dc44088049
commit b0b661bd4d
2 changed files with 2 additions and 0 deletions

View File

@ -38,6 +38,7 @@ namespace NewHorizons.Builder.Body
}
else
{
// TODO we gotta get this working better
// If we've loaded a new heightmap we'll delete the texture after
// Only delete it if it wasnt loaded before (something else is using it)
deleteHeightmapFlag = !ImageUtilities.IsTextureLoaded(mod, module.heightMap);

View File

@ -32,6 +32,7 @@ namespace NewHorizons.Builder.Props
{
try
{
// TODO copy what heightmap builder does eventually
heightMapTexture = ImageUtilities.GetTexture(mod, heightMap.heightMap);
// defer remove texture to next frame
Delay.FireOnNextUpdate(() => Object.Destroy(heightMapTexture));