diff options
author | Strangerke | 2016-09-06 22:52:58 +0200 |
---|---|---|
committer | Strangerke | 2016-09-06 22:52:58 +0200 |
commit | 78085dcd8d376e6f66f753fa40fc5537ba604d42 (patch) | |
tree | a3f81da9aae63a384e99241b275351ff448b8cdc /engines/dm | |
parent | 92ca2ae87bd1702160853c8187ef8ef4adead950 (diff) | |
download | scummvm-rg350-78085dcd8d376e6f66f753fa40fc5537ba604d42.tar.gz scummvm-rg350-78085dcd8d376e6f66f753fa40fc5537ba604d42.tar.bz2 scummvm-rg350-78085dcd8d376e6f66f753fa40fc5537ba604d42.zip |
DM: Take Dreammaster's suggestion into account to make it even more readable
Diffstat (limited to 'engines/dm')
-rw-r--r-- | engines/dm/projexpl.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/engines/dm/projexpl.cpp b/engines/dm/projexpl.cpp index 25e0b585d3..3bcd3ca963 100644 --- a/engines/dm/projexpl.cpp +++ b/engines/dm/projexpl.cpp @@ -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; } } } |