Deregister scenes if no one is in them instead of deregistering when no entities are in them

This commit is contained in:
Melledy 2022-04-29 03:09:17 -07:00
parent ffc1f801e6
commit cb15a5dec9

View File

@ -225,7 +225,7 @@ public class Scene {
} }
// Deregister scene if not in use // Deregister scene if not in use
if (this.getEntities().size() <= 0 && !this.dontDestroyWhenEmpty()) { if (this.getPlayerCount() <= 0 && !this.dontDestroyWhenEmpty()) {
this.getWorld().deregisterScene(this); this.getWorld().deregisterScene(this);
} }
} }