Re: [Code] re: multi attacks

From: James Rackley (
Date: 09/09/96

no no no thats note what needs to be added!!!!!

after each hit(blah blah); b4 that line needs to be put a 
    if (GET_POS(ch) == POS_FIGHTING)
that way if the mob/pc is stunned it wont do the attack..
thats the olny thing that needs to be changed added if needed ill send my 
exact code that i put in for this and show you :).

On Mon, 9 Sep 1996, Rasmus 'Con' Ronlev wrote:

> On Sun, 8 Sep 1996, annick elziere wrote:
> >     I see that im not the only one having problems with using that
> > system for going about multiple attacks, I have tried numorous
> > variations of that type of system and they all seem to do the same
> > thing.
> >     If none of you circle guru's know whats wrong with this type
> > of system, can you guide me toward a better way?  Im not looking
> > for code, just for an idea or a direction to go about it.
> Not to flame anyone, but I think people might be a little fed up answering
> the same question, because that's what it basically is. The solution to
> keep the mud from segfaulting due to the addition of multiple-hits inside
> the perform_violence() routine is to make a :
> if (FIGHTING(ch))
> {
>   ... do some hit stuff and skill checking
> }
> That will stop all the crashes, at least some of them :)
> What happens is, that when you call the hit() function it calls the
> damage() function, which MIGHT 'kill' the mob/player ch is fighting, and
> extract it from the game (by calling die())..... Thus, if you call hit()
> successfully after that, before ending the perform_violence() routine, you
> will be trying to kill/hit something thats no longer in the game...
> This causes SERIOUS problems (segmentation faults, on everything but
> Linux - personal oppinion :).
> Using Linux for mud devellopment sucks  (allso my oppinion, because it's
> too forgiving at present!). Does anyone know if it's possible for a C.S.
> student, to obtain a free copy of Solaris for the intel family proccessors
> ?
> Regards,
> Con.
> d.
> --
>      Rasmus Rønlev DOEK'94      WWW:
>      Student instructor         MUD: 5000
>                                 5000
>        Student, B.Sc in Computer Science and Business Administration.
> +-----------------------------------------------------------+
> | Ensure that you have read the CircleMUD Mailing List FAQ: |
> |   |
> +-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   |

This archive was generated by hypermail 2b30 : 12/18/00 PST