Browse Source

Tracking: Use BFLAG_LIT instead of BFLAG_VISIBLE (like cursor and drawing logic)

pull/2961/head^2
obligaron 5 years ago committed by Anders Jenbo
parent
commit
f7f02714fb
  1. 4
      Source/cursor.cpp

4
Source/cursor.cpp

@ -335,7 +335,7 @@ void CheckCursMove()
const auto &monster = Monsters[pcursmonst];
if (monster._mDelFlag || monster._mhitpoints >> 6 <= 0
|| (monster._mFlags & MFLAG_HIDDEN) != 0
|| ((dFlags[monster.position.tile.x][monster.position.tile.y] & BFLAG_VISIBLE) == 0)) {
|| ((dFlags[monster.position.tile.x][monster.position.tile.y] & BFLAG_LIT) == 0)) {
pcursmonst = -1;
}
} else if (pcursobj != -1) {
@ -345,7 +345,7 @@ void CheckCursMove()
auto &targetPlayer = Players[pcursplr];
if (targetPlayer._pmode == PM_DEATH || targetPlayer._pmode == PM_QUIT || !targetPlayer.plractive
|| currlevel != targetPlayer.plrlevel || targetPlayer._pHitPoints >> 6 <= 0
|| ((dFlags[targetPlayer.position.tile.x][targetPlayer.position.tile.y] & BFLAG_VISIBLE) == 0))
|| ((dFlags[targetPlayer.position.tile.x][targetPlayer.position.tile.y] & BFLAG_LIT) == 0))
pcursplr = -1;
}

Loading…
Cancel
Save