Re: fireweapons

From: The Fractal Dimension Administration (fracdime@GEOCITIES.COM)
Date: 08/26/98


>  WOW! Del Minturn wrote on Wed, 26 Aug 1998
>
> >check the archives.. the twist has been done before..
>
>
> Ive checked em, cant find em, hmmmmm
>

Curiously enough, FearItSelf (Chris Jacobson) of Aliens vs. Predators
has a system _very_ much like it.  He has posted messages to that
effect, and excellent hints.

Even more curious:  I have a system _very_ much like it too... isn't
it a small world?  I wrote it based off of Ranged Weapons 2.1 ...
leaving the original weapons in and then implementing fireweapons and
missiles... renaming them to TYPE_GUN and TYPE_AMMO because it was
easier to remember that way.  The grenade code took a while to figure
out though.  It worked on a Linux machine, it won't work in Windows
95.  It was because of the free_obj function call for exploded
grenades.  Contrary to some of your opinions, it _did_ work in bpl12
on a RedHat 5 machine.  The ranged weapons damage() call did crash
that machine tho... that one was easier to figure out.  I think I've
talked enough about me for today... so here's the answer to your
question.

In do_hit function add the GET_AMMO(obj)-- before all the checks for
if the guy hit or not, but after the checks for the existance of the
enemy and weapons and what-not.  Easy enough?  Make sure you test
that the weapon type is shootable and it contains AMMO.  Personally,
I decided eventually to add another struct obj_data pointer field in
the obj_data field to refer to the almighty Ammo clip.
.-------------------------------------------------------------.
| The Fractal Dimension    --    "Nonexistent mud of the year"|
'-------------------------------------------------------------'


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



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