mirror of
https://github.com/XProger/OpenLara.git
synced 2025-08-16 01:54:38 +02:00
fix trigger parser
This commit is contained in:
@@ -403,15 +403,22 @@ struct Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
case TR::FloorData::TRIGGER : {
|
case TR::FloorData::TRIGGER : {
|
||||||
if (info.trigCmdCount) break;
|
bool skip = info.trigCmdCount > 0;
|
||||||
info.trigger = (TR::Level::Trigger::Type)cmd.sub;
|
|
||||||
info.trigCmdCount = 0;
|
if (!skip) {
|
||||||
info.trigInfo = (*fd++).triggerInfo;
|
info.trigger = (TR::Level::Trigger::Type)cmd.sub;
|
||||||
|
info.trigCmdCount = 0;
|
||||||
|
info.trigInfo = (*fd++).triggerInfo;
|
||||||
|
} else
|
||||||
|
fd++;
|
||||||
|
|
||||||
TR::FloorData::TriggerCommand trigCmd;
|
TR::FloorData::TriggerCommand trigCmd;
|
||||||
do {
|
do {
|
||||||
ASSERT(info.trigCmdCount < MAX_TRIGGER_COMMANDS);
|
|
||||||
trigCmd = (*fd++).triggerCmd; // trigger action
|
trigCmd = (*fd++).triggerCmd; // trigger action
|
||||||
info.trigCmd[info.trigCmdCount++] = trigCmd;
|
if (!skip) {
|
||||||
|
ASSERT(info.trigCmdCount < MAX_TRIGGER_COMMANDS);
|
||||||
|
info.trigCmd[info.trigCmdCount++] = trigCmd;
|
||||||
|
}
|
||||||
} while (!trigCmd.end);
|
} while (!trigCmd.end);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user