]> granicus.if.org Git - nethack/commitdiff
Mimics created by #wizgenesis blocked vision incorrectly
authorPasi Kallinen <paxed@alt.org>
Fri, 14 Sep 2018 18:07:08 +0000 (21:07 +0300)
committerPasi Kallinen <paxed@alt.org>
Fri, 14 Sep 2018 18:07:08 +0000 (21:07 +0300)
doc/fixes36.2
src/makemon.c
src/read.c

index b8fff8beaa43e23cbd601f2a521032aa5eb9a50d..6887cd1956ab324124c3d1db8695407a726aad07 100644 (file)
@@ -115,6 +115,7 @@ for hilite_status of string status fields (title, dungeon-level, alignment),
        the types value-goes-up and -down aren't meaningful; treat them as
        value-changed if from config file and don't offer as choices with 'O'
 jumping into or over a Sokoban pit, or over a fire trap, triggers trap twice
+mimics created by #wizgenesis could block or not block vision incorrectly
 
 
 Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository
index 0ba833def2d3545797e0405b4c73ca632d54696b..0d38383dc2ca3c8a8538a5c8d53e77121bae8396 100644 (file)
@@ -2126,16 +2126,12 @@ register struct monst *mtmp;
             appear = Is_rogue_level(&u.uz) ? S_hwall : S_hcdoor;
         else
             appear = Is_rogue_level(&u.uz) ? S_vwall : S_vcdoor;
-        if (!mtmp->minvis || See_invisible)
-            block_point(mx, my); /* vision */
     } else if (level.flags.is_maze_lev && !In_sokoban(&u.uz) && rn2(2)) {
         ap_type = M_AP_OBJECT;
         appear = STATUE;
     } else if (roomno < 0 && !t_at(mx, my)) {
         ap_type = M_AP_OBJECT;
         appear = BOULDER;
-        if (!mtmp->minvis || See_invisible)
-            block_point(mx, my); /* vision */
     } else if (rt == ZOO || rt == VAULT) {
         ap_type = M_AP_OBJECT;
         appear = GOLD_PIECE;
@@ -2193,6 +2189,9 @@ register struct monst *mtmp;
         if (appear == EGG && !can_be_hatched(MCORPSENM(mtmp)))
             MCORPSENM(mtmp) = NON_PM; /* revert to generic egg */
     }
+
+    if (does_block(mx, my, &levl[mx][my]))
+        block_point(mx, my);
 }
 
 /* release monster from bag of tricks; return number of monsters created */
index c4cf716e96c78a3f2de1f52e6c4c966305efb487..8691d7f4c72c835c80039a274620ae436f1e12e7 100644 (file)
@@ -2550,8 +2550,14 @@ struct _create_particular_data *d;
 
             put_saddle_on_mon(otmp, mtmp);
         }
-        if (d->invisible)
+        if (d->invisible) {
+            int mx = mtmp->mx, my = mtmp->my;
             mon_set_minvis(mtmp);
+            if (does_block(mx, my, &levl[mx][my]))
+                block_point(mx, my);
+            else
+                unblock_point(mx, my);
+        }
         if (d->sleeping)
             mtmp->msleeping = 1;
         madeany = TRUE;