Weapon_superfrag can't load things simply 'because the header is
included'. In order to do things from weapon_grenade, weapon_superfrag
needs to be a CHILD of weapon_grenade. For customizations, you then
override functions with the same name, by adding the overriding
functions into superfrag.

If you want to make weapon_superfrag do something different from the
normal one, you override the function you need to change so that it does
the same code with different options. This is inheritance.

-Tony
 
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Yorg Kuijs
Sent: September-26-08 9:19 AM
To: Discussion of Half-Life Programming
Subject: Re: [hlcoders] grenade code

alright I think I fixed the previous problems
but can't really test it yet.
Right now in weapon_superfrag it does SetTimer bla bla bla and what is 
actually that timer is named m_flThrowTime

in grenade_superfrag.cpp it uses m_flDetonateTime now what I need to 
make is m_flDetonateTime = m_flThrowTime
so that it basically keeps counting from the timer that started before 
grenade was thrown(otherwise it would reset the timer when you throw it)

I know weapon_superfrag can load things from grenade_superfrag because 
the header file is included, how would I handle this reversed? 
weapon_superfrag does NOT have a header file, also the m_flThrowTime is 
actually declared in weapon_basehlmpcombatweapon(or something like it)



_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives,
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders


_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to