mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-04 09:18:38 +00:00
KYRA: (EOB) - fix monster distance attack bug
This commit is contained in:
parent
97e5036bf0
commit
e29f639791
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user