Skip to content

Commit

Permalink
Bugfix: Invisible monsters/towners in solid tiles in vision range (#7084
Browse files Browse the repository at this point in the history
)
  • Loading branch information
kphoenix137 committed Apr 17, 2024
1 parent a6e2481 commit ed0b3fd
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions Source/engine/render/scrollrt.cpp
Expand Up @@ -631,9 +631,6 @@ void DrawItem(const Surface &out, int8_t itemIndex, Point targetBufferPosition)
*/
void DrawMonsterHelper(const Surface &out, Point tilePosition, Point targetBufferPosition)
{
if (TileHasAny(dPiece[tilePosition.x][tilePosition.y], TileProperties::Solid))
return;

int mi = dMonster[tilePosition.x][tilePosition.y];

mi = std::abs(mi) - 1;
Expand All @@ -649,7 +646,7 @@ void DrawMonsterHelper(const Surface &out, Point tilePosition, Point targetBuffe
return;
}

if (!IsTileLit(tilePosition) && !MyPlayer->_pInfraFlag)
if (!IsTileLit(tilePosition) && (!MyPlayer->_pInfraFlag || TileHasAny(dPiece[tilePosition.x][tilePosition.y], TileProperties::Solid)))
return;

if (static_cast<size_t>(mi) >= MaxMonsters) {
Expand Down

0 comments on commit ed0b3fd

Please sign in to comment.