diff options
author | Clyne Sullivan <tullivan99@gmail.com> | 2016-07-01 10:34:55 -0400 |
---|---|---|
committer | Clyne Sullivan <tullivan99@gmail.com> | 2016-07-01 10:34:55 -0400 |
commit | 40e0c5d15ee6cd24bdc305e40ae6895aca18e669 (patch) | |
tree | 43e615bec6d86dba5f01e3133d5f412f3baf35cd /src/entities.cpp | |
parent | f620d82757becbb2270a37921fc989cb777f8824 (diff) |
removed mob,build,npc vectors
Diffstat (limited to 'src/entities.cpp')
-rw-r--r-- | src/entities.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/entities.cpp b/src/entities.cpp index f4c020c..e49d0ca 100644 --- a/src/entities.cpp +++ b/src/entities.cpp @@ -783,9 +783,9 @@ OTHERSTUFF: // trigger other npcs if desired if (!(nname = exml->StrAttribute("call")).empty()) { - NPC *n = *std::find_if(std::begin(currentWorld->npc), std::end(currentWorld->npc), [nname](NPC *npc) { - return (npc->name == nname); - }); + NPC *n = dynamic_cast<NPC *>(*std::find_if(std::begin(currentWorld->entity), std::end(currentWorld->entity), [nname](Entity *e) { + return (e->type == NPCT && e->name == nname); + })); if (exml->QueryUnsignedAttribute("callid", &idx) == XML_NO_ERROR) { n->dialogIndex = idx; |