NPCs decrement World.updatable on death. Fixes problem making Worlds stay loaded forever in RAM

This commit is contained in:
simon 2018-02-27 16:51:18 -05:00
parent a7d1a00ae8
commit 156deb8f4e

View File

@ -48,6 +48,8 @@ public class HarvesterNPC extends NonPlayerCharacter {
@Override
public void onDeadCallback() {
getWorld().decUpdatable();
if (getFactory() != null && getFactory().getNpcs() != null) {
getFactory().getNpcs().remove(this);
}