Bugfixes for world object caches not clearing when reloading without restart and retextures of a small number of things like fire not working
This commit is contained in:
@@ -84,8 +84,8 @@ public class WorldObjectsOptimization : ClassWithFishPrepatches
|
||||
}
|
||||
|
||||
public static int
|
||||
CachedWorldObjectsVersion,
|
||||
CachedMapsVersion;
|
||||
CachedWorldObjectsVersion = -2,
|
||||
CachedMapsVersion = -2;
|
||||
|
||||
private static Type[]
|
||||
_whitelistedTickingCompTypes
|
||||
@@ -110,5 +110,9 @@ public class WorldObjectsOptimization : ClassWithFishPrepatches
|
||||
public static bool CacheDirty(WorldObjectsHolder instance)
|
||||
=> CachedWorldObjectsVersion != instance.worldObjects._version
|
||||
|| CachedMapsVersion != Current.gameInt.maps._version;
|
||||
|
||||
public static void SetDirty() => CachedWorldObjectsVersion = CachedMapsVersion = -2;
|
||||
|
||||
static WorldObjectsHolderTickPatch() => Cache.Utility.Cleared += SetDirty;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user