Skip to content

Commit

Permalink
DM: Take Dreammaster's suggestion into account to make it even more r…
Browse files Browse the repository at this point in the history
…eadable
  • Loading branch information
Strangerke committed Sep 6, 2016
1 parent 92ca2ae commit 78085dc
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions engines/dm/projexpl.cpp
Expand Up @@ -132,12 +132,16 @@ bool ProjExpl::hasProjectileImpactOccurred(int16 impactType, int16 mapXCombo, in
return false;
} else {
int16 associatedThingIndex = _vm->_dungeonMan->getObjectInfoIndex(projectileAssociatedThing);
if ((projectileThingData->_attack > _vm->getRandomNumber(128))
&& getFlag(_vm->_dungeonMan->_objectInfos[associatedThingIndex].getAllowedSlots(), k0x0100_ObjectAllowedSlotPouchPassAndThroughDoors)) {
uint16 associatedAllowedSlots = _vm->_dungeonMan->_objectInfos[associatedThingIndex].getAllowedSlots();
int16 iconIndex = _vm->_objectMan->getIconIndex(projectileAssociatedThing);

int16 iconIndex = _vm->_objectMan->getIconIndex(projectileAssociatedThing);
if ((projectileAssociatedThingType != k10_JunkThingType) || (iconIndex < k176_IconIndiceJunkIronKey) || (iconIndex > k191_IconIndiceJunkMasterKey))
return false;
if ((projectileThingData->_attack > _vm->getRandomNumber(128))
&& getFlag(associatedAllowedSlots, k0x0100_ObjectAllowedSlotPouchPassAndThroughDoors)
&& ( (projectileAssociatedThingType != k10_JunkThingType)
|| (iconIndex < k176_IconIndiceJunkIronKey)
|| (iconIndex > k191_IconIndiceJunkMasterKey)
)) {
return false;
}
}
}
Expand Down

0 comments on commit 78085dc

Please sign in to comment.