diff options
Diffstat (limited to 'src/mob.cpp')
-rw-r--r-- | src/mob.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/mob.cpp b/src/mob.cpp index ed9fbf4..7701086 100644 --- a/src/mob.cpp +++ b/src/mob.cpp @@ -350,11 +350,20 @@ void Trigger::act(void) xml.LoadFile(currentXML.c_str()); exml = xml.FirstChildElement("Trigger"); - while(exml->StrAttribute("id") != id) + while(exml && exml->StrAttribute("id") != id) exml = exml->NextSiblingElement(); player->vel.x = 0; + if (exml == nullptr) { + auto id = xmle->StrAttribute("cid"); + if (!id.empty()) { + game::setValue(id, xmle->StrAttribute("cvalue")); + game::briceUpdate(); + } + return; + } + ui::toggleBlackFast(); ui::waitForCover(); |