bolt->s.eflags


(fretn) #1

if you comment the line:
bolt->s.eFlags = EF_BOUNCE_HALF | EF_BOUNCE;

in the grenade code, the grenade explodes on contact.

Normally when the entity thinks , G_ExplodeMissile is called.
But which function is called to make the explosion when the entity explodes on contact ?

fretn


(Hewster) #2

Well, i just took a quick look…

I guess its in G_MissileImpact
and since the flag aint set to bounce, it may be
treated as G_ExplodeMissilePoisonGas

need to test

let me know if you find it :smile:

Hewster


(digibob) #3

For any entity of eType ET_MISSILE G_RunMissile is run every server frame, this is not the entities thinking function however, i think teh panzerfaust have G_ExplodeMissile as it’s think function, but with a very long delay.

As for grenades, as they have the bounce eFlag set, in G_MissileImpact they will run G_BounceMissile instead of just doing G_ExplodeMissile, they also have their think function set to G_ExplodeMissile, but with a timer equal to the amount of time left on the grenade.


(fretn) #4

ok, it’s g_missileImpact

btw: it’s not treated as g_explodemissilePoisonGas

thanks

fretn


(Hewster) #5

Great,

I feel pretty good that I was right about
G_MissileImpact :smile:
G_ExplodeMissilePoisonGas was a bit of a dumb
guess !!

djbobs reply now makes it pretty obvious
why it gets treated as G_ExplodeMissile when
the eflag not set to bounce, thanks.

It’s great how much one can learn from other
peoples questions :grin:

Hewster