diff options
author | Florian Kagerer | 2009-06-06 18:46:07 +0000 |
---|---|---|
committer | Florian Kagerer | 2009-06-06 18:46:07 +0000 |
commit | b43df63b1c335c7c3f03dcbf2bb645ea63c59149 (patch) | |
tree | 844166e26ce9557fe62fa523731392e34bb2ebd3 | |
parent | f4360dffe3da2e7ad9bce3e912d810be280c2e26 (diff) | |
download | scummvm-rg350-b43df63b1c335c7c3f03dcbf2bb645ea63c59149.tar.gz scummvm-rg350-b43df63b1c335c7c3f03dcbf2bb645ea63c59149.tar.bz2 scummvm-rg350-b43df63b1c335c7c3f03dcbf2bb645ea63c59149.zip |
LOL: fix flying item hit processing
svn-id: r41292
-rw-r--r-- | engines/kyra/items_lol.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/engines/kyra/items_lol.cpp b/engines/kyra/items_lol.cpp index b32988683b..98894154f0 100644 --- a/engines/kyra/items_lol.cpp +++ b/engines/kyra/items_lol.cpp @@ -451,22 +451,19 @@ void LoLEngine::objectFlightProcessHits(FlyingObject *t, int x, int y, int objec if (objectOnNextBlock == 1) { runLevelScriptCustom(calcNewBlockPosition(_itemsInPlay[t->item].block, t->direction >> 1), 0x8000, -1, t->item, 0, 0); - return; } else if (objectOnNextBlock == 2) { if (_itemProperties[_itemsInPlay[t->item].itemPropertyIndex].flags & 0x4000) { int o = _levelBlockProperties[_itemsInPlay[t->item].block].assignedObjects; - while (o & 0x8000) { ItemInPlay *i = findObject(o); o = i->nextAssignedObject; runItemScript(t->attackerId, t->item, 0x8000, o, 0); } - return; - } else { r = getNearestMonsterFromPos(x, y); + runItemScript(t->attackerId, t->item, 0x8000, r, 0); } } else if (objectOnNextBlock == 4) { @@ -476,14 +473,11 @@ void LoLEngine::objectFlightProcessHits(FlyingObject *t, int x, int y, int objec if (_characters[i].flags & 1) runItemScript(t->attackerId, t->item, 0x8000, i, 0); } - return; - } else { r = getNearestPartyMemberFromPos(x, y); + runItemScript(t->attackerId, t->item, 0x8000, r, 0); } - } - - runItemScript(t->attackerId, t->item, 0x8000, r, 0); + } } void LoLEngine::updateFlyingObject(FlyingObject *t) { |