more monster iteration
Re-use the array allocated for iterating over all monsters during monster movement much of the time. It was being allocated from scratch for each round of monster movement, then freed after they moved, then repeated the next round.
This commit is contained in:
@@ -1184,8 +1184,7 @@ freedynamicdata(void)
|
||||
|
||||
/* move-specific data */
|
||||
dmonsfree(); /* release dead monsters */
|
||||
if (gi.itermonarr)
|
||||
free((genericptr_t) gi.itermonarr), gi.itermonarr = NULL;
|
||||
alloc_itermonarr(0U); /* a request of 0 releases existing allocation */
|
||||
|
||||
/* level-specific data */
|
||||
done_object_cleanup(); /* maybe force some OBJ_FREE items onto map */
|
||||
|
||||
Reference in New Issue
Block a user