--- deliantra/server/common/readable.C 2009/10/15 23:24:38 1.47 +++ deliantra/server/common/readable.C 2009/10/16 00:02:22 1.49 @@ -733,9 +733,8 @@ /* init_mon_info() - creates the linked list of pointers to * monster archetype objects if not called previously */ - static void -init_mon_info (void) +init_mon_info () { archetype *at; static int did_init_mon_info = 0; @@ -746,17 +745,17 @@ did_init_mon_info = 1; for_all_archetypes (at) - { - if (QUERY_FLAG (at, FLAG_MONSTER) && (!QUERY_FLAG (at, FLAG_CHANGING) || QUERY_FLAG (at, FLAG_UNAGGRESSIVE))) - { - objectlink *mon = new objectlink; + if (at->flag [FLAG_MONSTER] + && at->is_head () + && (!at->flag [FLAG_CHANGING] || at->flag [FLAG_UNAGGRESSIVE])) + { + objectlink *mon = new objectlink; - mon->ob = at; - mon->next = first_mon_info; - first_mon_info = mon; - nrofmon++; - } - } + mon->ob = at; + mon->next = first_mon_info; + first_mon_info = mon; + nrofmon++; + } LOG (llevDebug, "init_mon_info() got %d monsters\n", nrofmon); } @@ -1217,6 +1216,7 @@ /* didn't find a match */ if (!mon) return NULL; + if (mon->next) return mon->next->ob; else @@ -1813,8 +1813,6 @@ return; } - strcat (msgbuf, "\n"); /* safety -- we get ugly map saves/crashes w/o this */ - if (strlen (msgbuf) > 1) { book->msg = msgbuf;