Unify monster gender setting

This commit is contained in:
Pasi Kallinen
2015-04-22 08:58:04 +03:00
parent 3bf2d17e2c
commit 171e8284cd
3 changed files with 18 additions and 15 deletions

View File

@@ -1499,14 +1499,8 @@ struct mkroom *croom;
if ((mndx != NON_PM) && (&mons[mndx] != mtmp->data)) {
struct permonst *mdat = &mons[mndx];
struct permonst *olddata = mtmp->data;
/* this code duplicated from newcham() */
if(is_male(mdat)) {
if(mtmp->female) mtmp->female = FALSE;
} else if (is_female(mdat)) {
if(!mtmp->female) mtmp->female = TRUE;
} else if (!is_neuter(mdat)) {
if(!rn2(10)) mtmp->female = !mtmp->female;
}
mgender_from_permonst(mtmp, mdat);
set_mon_data(mtmp, mdat, 0);
if (emits_light(olddata) != emits_light(mtmp->data)) {
/* used to give light, now doesn't, or vice versa,