From 493af8f40b7b4c16ab4d74ea6a5d0b7d97dac767 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sun, 5 Nov 2006 07:42:23 +0000 Subject: Only read a single item, in doTable opcode svn-id: r24624 --- engines/agos/script_e2.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/engines/agos/script_e2.cpp b/engines/agos/script_e2.cpp index 64df361a56..60158590fe 100644 --- a/engines/agos/script_e2.cpp +++ b/engines/agos/script_e2.cpp @@ -148,7 +148,9 @@ void AGOSEngine::oe2_drawItem() { void AGOSEngine::oe2_doTable() { // 143: start item sub - SubRoom *r = (SubRoom *)findChildOfType(getNextItemPtr(), 1); + Item *i = getNextItemPtr(); + + SubRoom *r = (SubRoom *)findChildOfType(i, 1); if (r != NULL) { Subroutine *sub = getSubroutineByID(r->subroutine_id); if (sub) { @@ -158,7 +160,7 @@ void AGOSEngine::oe2_doTable() { } if (getGameType() == GType_ELVIRA2) { - SubSuperRoom *sr = (SubSuperRoom *)findChildOfType(getNextItemPtr(), 4); + SubSuperRoom *sr = (SubSuperRoom *)findChildOfType(i, 4); if (sr != NULL) { Subroutine *sub = getSubroutineByID(sr->subroutine_id); if (sub) { -- cgit v1.2.3