]> granicus.if.org Git - nethack/commitdiff
Entering special room, wake up only that room
authorPasi Kallinen <paxed@alt.org>
Wed, 5 May 2021 17:32:47 +0000 (20:32 +0300)
committerPasi Kallinen <paxed@alt.org>
Wed, 5 May 2021 17:34:05 +0000 (20:34 +0300)
... instead of doing a level-wide wake-up.

Fixes #429

doc/fixes37.0
src/hack.c

index bd5834ac49e9dfd47a10b97f00558347bb51c8b2..ecae268868cfd1dbf96a139b125011bf2b035908 100644 (file)
@@ -495,6 +495,8 @@ change "killed by <a foo>, while {paralyzed|frozen} by <a foo>" into
        hero's helplessness
 "It looks very angry" would be given if a hero wielding Excalibur or Demonbane
        offended an unseen demon lord
+Entering a special room, only wake up the monsters in that room instead of
+       doing a level-wide wake-up
 
 
 Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
index a324726b737447c53d9280dbf871557146e7f59d..bcec86d9a1168f6fadd48da3b7cd49a1967c10a8 100644 (file)
@@ -2650,6 +2650,9 @@ check_special_room(boolean newlev)
                 for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
                     if (DEADMONSTER(mtmp))
                         continue;
+                    if (!isok(mtmp->mx,mtmp->my)
+                        || roomno != levl[mtmp->mx][mtmp->my].roomno)
+                        continue;
                     if (!Stealth && !rn2(3))
                         mtmp->msleeping = 0;
                 }