aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorathrxx2011-06-23 23:48:59 +0200
committerJohannes Schickel2011-12-26 16:18:12 +0100
commite29f6397911265439fb229710bf17282c66d5f51 (patch)
tree433b2c8982fd8eb193b523334de613c07cc30e27 /engines
parent97e5036bf0022f1b5e2ce5a9fe3a11d5f3216b50 (diff)
downloadscummvm-rg350-e29f6397911265439fb229710bf17282c66d5f51.tar.gz
scummvm-rg350-e29f6397911265439fb229710bf17282c66d5f51.tar.bz2
scummvm-rg350-e29f6397911265439fb229710bf17282c66d5f51.zip
KYRA: (EOB) - fix monster distance attack bug
Diffstat (limited to 'engines')
-rw-r--r--engines/kyra/items_eob.cpp2
-rw-r--r--engines/kyra/script_eob.cpp3
-rw-r--r--engines/kyra/sprites_eob.cpp4
3 files changed, 3 insertions, 6 deletions
diff --git a/engines/kyra/items_eob.cpp b/engines/kyra/items_eob.cpp
index 98cd634405..f7aed1b920 100644
--- a/engines/kyra/items_eob.cpp
+++ b/engines/kyra/items_eob.cpp
@@ -99,7 +99,7 @@ Kyra::Item EobCoreEngine::duplicateItem(Item itemIndex) {
if (!foundSlot)
return 0;
- memcpy(&_items[i], &_items[itemIndex], sizeof(EobItem));
+ memcpy(&_items[i], itm, sizeof(EobItem));
return i;
}
diff --git a/engines/kyra/script_eob.cpp b/engines/kyra/script_eob.cpp
index c514c8d239..9e18a14fb2 100644
--- a/engines/kyra/script_eob.cpp
+++ b/engines/kyra/script_eob.cpp
@@ -80,8 +80,6 @@ EobInfProcessor::EobInfProcessor(EobCoreEngine *engine, Screen_Eob *screen) : _v
_commandMin(engine->game() == GI_EOB1 ? -27 : -31) {
#define Opcode(x) _opcodes.push_back(new InfProc(this, &EobInfProcessor::x))
-//#define OpcodeAltV(x, y) if (_vm->game() == GI_EOB1) Opcode(x); else Opcode(y);
-//#define OpcodeAlt(x) OpcodeAltV(x##_v1, x##_v2)
#define OpcodeAlt(x) if (_vm->game() == GI_EOB1) Opcode(x##_v1); else Opcode(x##_v2);
Opcode(oeob_setWallType);
Opcode(oeob_toggleWallState);
@@ -114,7 +112,6 @@ EobInfProcessor::EobInfProcessor(EobCoreEngine *engine, Screen_Eob *screen) : _v
Opcode(oeob_dialogue);
Opcode(oeob_specialEvent);
#undef Opcode
-//#undef OpcodeAltV
#undef OpcodeAlt
_scriptData = 0;
diff --git a/engines/kyra/sprites_eob.cpp b/engines/kyra/sprites_eob.cpp
index 1fa89ead3c..109d244569 100644
--- a/engines/kyra/sprites_eob.cpp
+++ b/engines/kyra/sprites_eob.cpp
@@ -941,7 +941,7 @@ bool EobCoreEngine::updateMonsterTryDistanceAttack(EobMonsterInPlay *m) {
case 11:
itm = duplicateItem(60);
if (itm) {
- if (launchObject(-1, itm, m->block, m->pos, m->dir, _items[itm].type))
+ if (!launchObject(-1, itm, m->block, m->pos, m->dir, _items[itm].type))
_items[itm].block = -1;
}
break;
@@ -997,7 +997,7 @@ bool EobCoreEngine::updateMonsterTryDistanceAttack(EobMonsterInPlay *m) {
} else {
itm = duplicateItem(-s);
if (itm) {
- if (launchObject(-1, itm, m->block, m->pos, m->dir, _items[itm].type))
+ if (!launchObject(-1, itm, m->block, m->pos, m->dir, _items[itm].type))
_items[itm].block = -1;
}
}