KYRA: (EOB) - fix monster distance attack bug

This commit is contained in:
athrxx 2011-06-23 23:48:59 +02:00 committed by Johannes Schickel
parent 97e5036bf0
commit e29f639791
3 changed files with 3 additions and 6 deletions

View File

@ -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;
}

View File

@ -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;

View File

@ -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;
}
}