diff options
Diffstat (limited to 'src/entities.cpp')
-rw-r--r-- | src/entities.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/entities.cpp b/src/entities.cpp index 3afcc40..6b9c3fe 100644 --- a/src/entities.cpp +++ b/src/entities.cpp @@ -95,11 +95,12 @@ void PlayerSystem::receive(const KeyDownEvent &kde) auto kc = kde.keycode; auto worldSwitch = [&](const WorldSwitchInfo& wsi){ - p->canMove = false; + player->canMove = false; ui::toggleBlackFast(); ui::waitForCover(); game::events.emit<BGMToggleEvent>(wsi.first->bgm, wsi.first); std::tie(currentWorld, player->loc) = wsi; // using p causes segfault + game::engine.getSystem<WorldSystem>()->setWorld(currentWorld); ui::toggleBlackFast(); ui::waitForUncover(); player->canMove = true; // using p causes segfault @@ -397,6 +398,7 @@ void NPC::createFromXML(XMLElement *e, World *w=nullptr) unsigned int flooor; xmle = e; + (void)w; // spawn at coordinates if desired E_LOAD_COORDS(100); @@ -412,10 +414,6 @@ void NPC::createFromXML(XMLElement *e, World *w=nullptr) else dialogIndex = 9999; - - if (/*Indoor && */e->QueryUnsignedAttribute("floor", &flooor) == XML_NO_ERROR) - Indoorp(w)->moveToFloor(this, flooor); - // custom health value E_LOAD_HEALTH; @@ -497,8 +495,7 @@ void Structures::createFromXML(XMLElement *e, World *w) // edge if (!inside.empty()) { - insideWorld = dynamic_cast<IndoorWorld *>(loadWorldFromXMLNoTakeover(inside)); - insideWorld->outside = inWorld; + insideWorld = loadWorldFromXMLNoTakeover(inside); } textureLoc = e->StrAttribute("texture"); |