From b52a2f799528da37b77ae0bca2148291324b5c85 Mon Sep 17 00:00:00 2001 From: nekiro Date: Sat, 16 Jan 2021 21:30:42 +0100 Subject: [PATCH] Monsters shouldn't see floors above 8 (#3250) --- src/creature.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/creature.cpp b/src/creature.cpp index 52c4ccdf1f..356c037f30 100644 --- a/src/creature.cpp +++ b/src/creature.cpp @@ -61,6 +61,11 @@ bool Creature::canSee(const Position& myPos, const Position& pos, int32_t viewRa } } else if (myPos.z >= 8) { //we are underground (8 -> 15) + // we can't see floors above 8 + if (pos.z < 8) { + return false; + } + //view is +/- 2 from the floor we stand on if (Position::getDistanceZ(myPos, pos) > 2) { return false;