remove unnecessary condition on save_mtraits()

`mtmp->data` here is always non-null, otherwise it leads segv at earlier code.
This commit is contained in:
SHIRAKATA Kentaro
2022-02-09 18:37:36 +09:00
parent 9847fcb5b1
commit 3ab0d92ac9

View File

@@ -2052,8 +2052,7 @@ save_mtraits(struct obj *obj, struct monst *mtmp)
*mtmp2 = *mtmp;
mtmp2->mextra = (struct mextra *) 0;
if (mtmp->data)
mtmp2->mnum = monsndx(mtmp->data);
mtmp2->mnum = monsndx(mtmp->data);
/* invalidate pointers */
/* m_id is needed to know if this is a revived quest leader */
/* but m_id must be cleared when loading bones */