Welcome to the Builder Academy

Question Bug in dying mob

More
29 May 2025 18:13 #10727 by thomas
Replied by thomas on topic Bug in dying mob
In the multi attack checks, yes.

A little longer explanation - I think you got the multi-attack patch from an older version of circlemud. In one of the last iterations of circle, the extraction system was changed from immediate (you died, you were removed from the game) to delayed (you die, a flag is set, and once all violence is done, any flagged characters are removed from the game at the same time), to avoid some relatively common bugs.
This means that in the current version, if you hit someone so hard they die, instead of removing them, we set a flag. Your code did not check for this flag. The macro DEAD(ch) simply checks if the character has that flag set, either as a player or as a mob.

Please Log in or Create an account to join the conversation.

More
30 May 2025 06:10 #10737 by Salty
Replied by Salty on topic Bug in dying mob
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.

Please Log in or Create an account to join the conversation.

More
30 May 2025 20:37 #10740 by JTP
Replied by JTP on topic Bug in dying mob
That seemed to work

Been killing like 50 mobs and no double XP/corpses

Thanks a lot Thomas

Please Log in or Create an account to join the conversation.

Time to create page: 0.206 seconds