cloning
Fix a minor cloning problem; clones didn't retain the monster's name or tameness. (The name *was* retained if you were cloned.) I also added a minor change in wizard mode to display a few tameness fields of a dog.
This commit is contained in:
@@ -445,6 +445,7 @@ No "corridor disappears" message if Vault guard dies off-level
|
|||||||
slip while mounting and levitating at will should not cause damage
|
slip while mounting and levitating at will should not cause damage
|
||||||
if you see a monster jump into a trap in a secret corridor, it's not secret
|
if you see a monster jump into a trap in a secret corridor, it's not secret
|
||||||
fixed a few places where unblock_point wasn't called but should have been
|
fixed a few places where unblock_point wasn't called but should have been
|
||||||
|
cloned monsters should have the same name and tameness as the original
|
||||||
|
|
||||||
|
|
||||||
Platform- and/or Interface-Specific Fixes
|
Platform- and/or Interface-Specific Fixes
|
||||||
|
|||||||
+7
-2
@@ -713,11 +713,14 @@ struct monst *mon;
|
|||||||
if (mon->isgd) m2->isgd = FALSE;
|
if (mon->isgd) m2->isgd = FALSE;
|
||||||
if (mon->ispriest) m2->ispriest = FALSE;
|
if (mon->ispriest) m2->ispriest = FALSE;
|
||||||
m2->mxlth = 0;
|
m2->mxlth = 0;
|
||||||
m2->mnamelth = 0;
|
|
||||||
place_monster(m2, m2->mx, m2->my);
|
place_monster(m2, m2->mx, m2->my);
|
||||||
if (emits_light(m2->data))
|
if (emits_light(m2->data))
|
||||||
new_light_source(m2->mx, m2->my, emits_light(m2->data),
|
new_light_source(m2->mx, m2->my, emits_light(m2->data),
|
||||||
LS_MONSTER, (genericptr_t)m2);
|
LS_MONSTER, (genericptr_t)m2);
|
||||||
|
if (m2->mnamelth) {
|
||||||
|
m2->mnamelth = 0; /* or it won't get allocated */
|
||||||
|
m2 = christen_monst(m2, NAME(mon));
|
||||||
|
}
|
||||||
newsym(m2->mx,m2->my); /* display the new monster */
|
newsym(m2->mx,m2->my); /* display the new monster */
|
||||||
if (mon->mtame) {
|
if (mon->mtame) {
|
||||||
struct monst *m3;
|
struct monst *m3;
|
||||||
@@ -727,8 +730,10 @@ struct monst *mon;
|
|||||||
* must be made non-tame to get initialized properly.
|
* must be made non-tame to get initialized properly.
|
||||||
*/
|
*/
|
||||||
m2->mtame = 0;
|
m2->mtame = 0;
|
||||||
if ((m3 = tamedog(m2, (struct obj *)0)) != 0)
|
if ((m3 = tamedog(m2, (struct obj *)0)) != 0) {
|
||||||
m2 = m3;
|
m2 = m3;
|
||||||
|
*(EDOG(m2)) = *(EDOG(mon));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return m2;
|
return m2;
|
||||||
}
|
}
|
||||||
|
|||||||
+7
-1
@@ -5,6 +5,9 @@
|
|||||||
#define NEED_VARARGS /* Uses ... */ /* comment line for pre-compiled headers */
|
#define NEED_VARARGS /* Uses ... */ /* comment line for pre-compiled headers */
|
||||||
#include "hack.h"
|
#include "hack.h"
|
||||||
#include "epri.h"
|
#include "epri.h"
|
||||||
|
#ifdef WIZARD
|
||||||
|
#include "edog.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef OVLB
|
#ifdef OVLB
|
||||||
|
|
||||||
@@ -282,7 +285,10 @@ register struct monst *mtmp;
|
|||||||
info[0] = 0;
|
info[0] = 0;
|
||||||
if (mtmp->mtame) { Strcat(info, ", tame");
|
if (mtmp->mtame) { Strcat(info, ", tame");
|
||||||
#ifdef WIZARD
|
#ifdef WIZARD
|
||||||
if (wizard) Sprintf(eos(info), " (%d)", mtmp->mtame);
|
if (wizard) {
|
||||||
|
Sprintf(eos(info), " (%d; hungry %ld; apport %d)",
|
||||||
|
mtmp->mtame, EDOG(mtmp)->hungrytime, EDOG(mtmp)->apport);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else if (mtmp->mpeaceful) Strcat(info, ", peaceful");
|
else if (mtmp->mpeaceful) Strcat(info, ", peaceful");
|
||||||
|
|||||||
Reference in New Issue
Block a user