Re: [CODING] Fight System Crash, in act.offensive

From: Chi Hue (
Date: 12/11/01

From: "Daniel A. Koepke" <dkoepke@CIRCLEMUD.ORG>
To: <>
> > [... snip ...]
> First things first, read the Mailing List FAQ guidelines for rules on
> properly formatting your messages.  Specifically, wrap lines at 79
> characters.
It was for mine, I didnt have it expanded, my bad.
> > --snip of act.offensive.c , in do_hit()
> What's num_attacking set to when it's not a gun?
When its not a gun, its run thru a switch, and set to 1-14, or 1 (default).
swtch is level atm, testing it. And it worked fine b4 guns in.
> Don't you want to end the loop when the player dies?
Thats done in fight.c , do_hit is onyl called once. I use the Pulse to add
lag accordingly, and
to check if dead. The guns did a little diferently.

> What is the victim set to for non-guns?
the arg for do_kill, its above the round combat
> WHat is it set to for guns?
> >  if ((GET_POS(ch) == POS_STANDING) && (vict != FIGHTING(ch))) {
> Why would you want the victim NOT equal to the person the character is
> fighting?
This is again in act.offensive.c, for Starting a fight, Fight.c takes care
during fight.
> >   while (num_attacking > 0)
> You're going to want to prevent shooting dead people...
Fight.c again
> ...someone already wrote something about your use of WAIT_STATE.  There's
> probably much more to be said, but such problems with loops in the fight
> code have been addressed countless times before.  Check the archives.
See Above about lag, etc.
Again, the Code worked flawless before the gun part,
so I feel somethign is getting set incorectly.
I ran the gun thru the loop itself, just to limit the size of code,
and to demonstrate the if () worked.

   | FAQ: |
   | Archives: |
   | Newbie List:   |

This archive was generated by hypermail 2b30 : 06/24/03 PDT