I ran in to this problem a few years back when I added multi-attacks to my tbaMUD 2018.
LuminariMUD had a solution I borrowed:
In fight.c, damage() calls die() which calls raw_kill(). In raw_kill() we add near the top:
Code:
/* luminari */
for (k = combat_list; k; k = temp)
{
temp = k->next_fighting;
if (FIGHTING(k) == ch)
stop_fighting(k);
}
added the global variable to fight.h and I was good to go.
Code:
extern struct char_data *combat_list;
This has worked a treat for like 5+ years.
All credit to the Luminari team.