Got it working now, in a eh rather weird way, but it works fine at least
the check for grenade being thrown or not
I basically looked at how IsTeamplay works
and basically added WasThrown and SetThrown to hl2mp_gamerules
the SetThrown is then set in the weapon file and gets it in the grenade
Sorry I didn't answer for a while, got an reply elsewhere and tried that
and have been playing l4d demo.
Since I didn't get any further I took a look again at the replies I got
from the list and got me thinking.
Tom, you say make a bool into grenade_frag, but then there's know to set
the bool
When you throw the grenade from the weapon file, and you create the
grenade entity, you will get a pointer to that entity.
If you make a couple of Set/Get functions for that, when it gets thrown
you can set the boolean through those functions.
You can read up about
extern is a generic c++ thing.. it just means the variable is defined
somewhere else.
garry
On Tue, Nov 11, 2008 at 12:45 PM, Yorg Kuijs [EMAIL PROTECTED] wrote:
Hey list,
have been fiddling with trying to get the bool fThrewGrenade from
weapon_frag to grenade_frag using extern bool
but
I assume thats a member variable of the weapon_frag class, so you would
need an instance of that to access the variable.
You could simply put another bool fThrewGrenade into grenade_frag and
then set that when you throw the grenade?
Garry Newman wrote:
extern is a generic c++ thing.. it just
Hey list,
have been fiddling with trying to get the bool fThrewGrenade from
weapon_frag to grenade_frag using extern bool
but whatever I try I can't seem to get it to work, can't find anything
about externs and searched through the code for examples and it seems it
can be done in a ton of ways
6 matches
Mail list logo