Commit cb15a5de authored by Melledy's avatar Melledy
Browse files

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

parent ffc1f801
......@@ -225,7 +225,7 @@ public class Scene {
}
// Deregister scene if not in use
if (this.getEntities().size() <= 0 && !this.dontDestroyWhenEmpty()) {
if (this.getPlayerCount() <= 0 && !this.dontDestroyWhenEmpty()) {
this.getWorld().deregisterScene(this);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment