U393 - jousting puddings into a polymorph trap caused 2 identical new monsters

Because hmon_hitmon caches the monster data type, it needs to update this
whenever the monster might polymorph.  It already did this for potions, but
not for jousting.  There are other more complex ways this could be addressed.
This commit is contained in:
cohrs
2003-06-08 19:36:45 +00:00
parent feccae0b74
commit 42d336aa94
2 changed files with 4 additions and 0 deletions

View File

@@ -970,6 +970,7 @@ int thrown;
/* avoid migrating a dead monster */
if (mon->mhp > tmp) {
mhurtle(mon, u.dx, u.dy, 1);
mdat = mon->data; /* in case of a polymorph trap */
if (DEADMONSTER(mon)) already_killed = TRUE;
}
hittxt = TRUE;
@@ -986,6 +987,7 @@ int thrown;
/* avoid migrating a dead monster */
if (mon->mhp > tmp) {
mhurtle(mon, u.dx, u.dy, 1);
mdat = mon->data; /* in case of a polymorph trap */
if (DEADMONSTER(mon)) already_killed = TRUE;
}
hittxt = TRUE;