monster sanity checking

Add some more checks for monsters when the sanity_check option
is enabled.
This commit is contained in:
PatR
2016-03-14 15:42:03 -07:00
parent 1a886241ae
commit 77fe8db320
2 changed files with 60 additions and 17 deletions

View File

@@ -3,8 +3,9 @@
/* NetHack may be freely redistributed. See license for details. */
#include "hack.h"
/* These routines provide basic data for any type of monster. */
/*
* These routines provide basic data for any type of monster.
*/
/* set up an individual monster's base type (initial creation, shapechange) */
void
@@ -16,6 +17,7 @@ int flag;
int new_speed, old_speed = mon->data ? mon->data->mmove : 0;
mon->data = ptr;
mon->mnum = (short) monsndx(ptr);
if (flag == -1)
return; /* "don't care" */