diff options
author | Strangerke | 2016-08-23 22:51:09 +0200 |
---|---|---|
committer | Bendegúz Nagy | 2016-08-26 23:02:22 +0200 |
commit | 31cb7cd2fc28c20819ba26386368ce861e189e8a (patch) | |
tree | f76ba8d747c6febaacecbb14b2c8ad221278e939 /engines/dm | |
parent | 35103036566a1b7a405d518f9e14e39dfdfbcdae (diff) | |
download | scummvm-rg350-31cb7cd2fc28c20819ba26386368ce861e189e8a.tar.gz scummvm-rg350-31cb7cd2fc28c20819ba26386368ce861e189e8a.tar.bz2 scummvm-rg350-31cb7cd2fc28c20819ba26386368ce861e189e8a.zip |
DM: Refactor unreadable if statement
Diffstat (limited to 'engines/dm')
-rw-r--r-- | engines/dm/movesens.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/dm/movesens.cpp b/engines/dm/movesens.cpp index adc9b5565f..747e8ef284 100644 --- a/engines/dm/movesens.cpp +++ b/engines/dm/movesens.cpp @@ -583,7 +583,7 @@ bool MovesensMan::f266_moveIsKilledByProjectileImpact(int16 srcMapX, int16 srcMa return false; } } - if ((destMapX >= 0) && (((((AL0700_i_Distance = srcMapX - destMapX) < 0) ? -AL0700_i_Distance : AL0700_i_Distance) + (((AL0700_i_Distance = srcMapY - destMapY) < 0) ? -AL0700_i_Distance : AL0700_i_Distance)) == 1)) { /* If source and destination squares are adjacent (if party or group is not being teleported) */ + if ((destMapX >= 0) && ((abs(srcMapX - destMapX) + abs(srcMapY - destMapY)) == 1)) { /* If source and destination squares are adjacent (if party or group is not being teleported) */ AL0699_ui_PrimaryDirection = _vm->_groupMan->f228_getDirsWhereDestIsVisibleFromSource(srcMapX, srcMapY, destMapX, destMapY); AL0700_i_SecondaryDirection = returnNextVal(AL0699_ui_PrimaryDirection); for (int16 i = 0; i < 4; ++i) |