Implement support for multiple scenes in a world

This commit is contained in:
Melledy
2022-04-18 09:39:29 -07:00
Unverified
parent 589d0dd6f8
commit 06ad1e8f9b
34 changed files with 2154 additions and 331 deletions
@@ -20,13 +20,13 @@ public class HandlerEvtCreateGadgetNotify extends PacketHandler {
}
// Sanity check - dont add duplicate entities
if (session.getPlayer().getWorld().getEntityById(notify.getEntityId()) != null) {
if (session.getPlayer().getScene().getEntityById(notify.getEntityId()) != null) {
return;
}
// Create entity and summon in world
EntityClientGadget gadget = new EntityClientGadget(session.getPlayer().getWorld(), session.getPlayer(), notify);
session.getPlayer().getWorld().onPlayerCreateGadget(gadget);
EntityClientGadget gadget = new EntityClientGadget(session.getPlayer().getScene(), session.getPlayer(), notify);
session.getPlayer().getScene().onPlayerCreateGadget(gadget);
}
}