aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2015-12-08 18:23:27 +0200
committerWillem Jan Palenstijn2015-12-23 21:33:56 +0100
commit53de3143f636486b89380e3b2ce245e2606b98e0 (patch)
tree41b8b7870b37407fa3efb67b8870051c87692829
parent90e221a570bf684dee016a0aaa5e8ca968465390 (diff)
downloadscummvm-rg350-53de3143f636486b89380e3b2ce245e2606b98e0.tar.gz
scummvm-rg350-53de3143f636486b89380e3b2ce245e2606b98e0.tar.bz2
scummvm-rg350-53de3143f636486b89380e3b2ce245e2606b98e0.zip
LAB: Cleanup doGoForward()
-rw-r--r--engines/lab/processroom.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/engines/lab/processroom.cpp b/engines/lab/processroom.cpp
index 26e91e5688..ed28e87453 100644
--- a/engines/lab/processroom.cpp
+++ b/engines/lab/processroom.cpp
@@ -690,10 +690,11 @@ bool doOperateRule(int16 x, int16 y, int16 ItemNum, CloseDataPtr *lcptr) {
bool doGoForward(CloseDataPtr *lcptr) {
RuleList *rules = g_lab->_rooms[g_lab->_roomNum]._rules;
- for (RuleList::iterator rule = rules->begin(); rule != rules->end(); ++rule) {
- if (((*rule)->_ruleType == GOFORWARD) && ((*rule)->_param1 == (g_lab->_direction + 1))) {
- if (checkConditions((*rule)->_condition)) {
- g_lab->doActions((*rule)->_actionList, lcptr);
+ for (RuleList::iterator ruleIter = rules->begin(); ruleIter != rules->end(); ++ruleIter) {
+ Rule *rule = *ruleIter;
+ if ((rule->_ruleType == GOFORWARD) && (rule->_param1 == (g_lab->_direction + 1))) {
+ if (checkConditions(rule->_condition)) {
+ g_lab->doActions(rule->_actionList, lcptr);
return true;
}
}