Azuvector
21-04-2009, 01:51
Posting this here, since I've probably gotten like 5+ people asking me the same question over time.
This post is intended for both the public, beta, and internally...
I'm just going to gloss over the details a bit, to avoid getting into lengthly stuff, but still provide a means of tracking down how it works without debugging through the code painstakingly. (Pulse nades should tbh be rewritten, they suck, code-wise.)
Pulse nades explode in a weird way, unlike most of the other explosives in the game.
In order:
detpackExplode() is called.
EV_MISSILE_MISS is fired.
EFFECT_EXPLOSION_DEMP2ALT is fired.
EV_CONC_ALT_IMPACT is fired.
EV_MISSILE_MISS doesn't actually do much of anything for pulse nades initially, although it does pass through the CG_G2MarkEvent() function, which I haven't bothered tracing. Might be some scorchmarks in there.
EFFECT_EXPLOSION_DEMP2ALT gets caught, which calls FX_DEMP2_AltDetonate() which spawns a sphere model(probably a shockwave thing)
"models/items/sphere.md3" with this shader on it: "gfx/effects/demp2shell"
Then it plays one of these effects, depending on enhanced effects settings:
"demp2/altDetonate.efx"
"demp2/altDetonate_enhanced1.efx"
"demp2/altDetonate_enhanced2.efx"
EV_CONC_ALT_IMPACT is then caught which plays
the "concussion/alt_ring.efx" effect maybe multiple times(cbf to look into the strange conditions on the loop its in)
then calls CG_MissileHitWall() using WP_DET_PACK which calls FX_RealConcussionHitWall(() which plays "concussion/explosion.efx"
then calls FX_ConcAltShot(), which creates a line of some sort using the "gfx/effects/blueLine" and "gfx/misc/whiteline2" shaders.
finally, FX_DisruptorAltBeizer() is called, which adds a shader of "gfx/effects/smokeTrail" to the surface it detonates on. Or straight up, if it blows in midair, I guess.
Finally, players/vehicles/npcs/etc caught in the blast have two shaders applied to them for a moment: "gfx/misc/electric" and "gfx/misc/fullbodyelectric2".
And while those electrical shaders are being applied, "effects/force/lightning_arc.efx" is used to draw electrical arcs reaching out from them. (Note that effect, and the two above electrical shaders are also used with Force Lightning, electrical trigger_damage's, and anything else that plays with electricity.)
Again, pulse nades suck, visual effects + code-wise.
This post is intended for both the public, beta, and internally...
I'm just going to gloss over the details a bit, to avoid getting into lengthly stuff, but still provide a means of tracking down how it works without debugging through the code painstakingly. (Pulse nades should tbh be rewritten, they suck, code-wise.)
Pulse nades explode in a weird way, unlike most of the other explosives in the game.
In order:
detpackExplode() is called.
EV_MISSILE_MISS is fired.
EFFECT_EXPLOSION_DEMP2ALT is fired.
EV_CONC_ALT_IMPACT is fired.
EV_MISSILE_MISS doesn't actually do much of anything for pulse nades initially, although it does pass through the CG_G2MarkEvent() function, which I haven't bothered tracing. Might be some scorchmarks in there.
EFFECT_EXPLOSION_DEMP2ALT gets caught, which calls FX_DEMP2_AltDetonate() which spawns a sphere model(probably a shockwave thing)
"models/items/sphere.md3" with this shader on it: "gfx/effects/demp2shell"
Then it plays one of these effects, depending on enhanced effects settings:
"demp2/altDetonate.efx"
"demp2/altDetonate_enhanced1.efx"
"demp2/altDetonate_enhanced2.efx"
EV_CONC_ALT_IMPACT is then caught which plays
the "concussion/alt_ring.efx" effect maybe multiple times(cbf to look into the strange conditions on the loop its in)
then calls CG_MissileHitWall() using WP_DET_PACK which calls FX_RealConcussionHitWall(() which plays "concussion/explosion.efx"
then calls FX_ConcAltShot(), which creates a line of some sort using the "gfx/effects/blueLine" and "gfx/misc/whiteline2" shaders.
finally, FX_DisruptorAltBeizer() is called, which adds a shader of "gfx/effects/smokeTrail" to the surface it detonates on. Or straight up, if it blows in midair, I guess.
Finally, players/vehicles/npcs/etc caught in the blast have two shaders applied to them for a moment: "gfx/misc/electric" and "gfx/misc/fullbodyelectric2".
And while those electrical shaders are being applied, "effects/force/lightning_arc.efx" is used to draw electrical arcs reaching out from them. (Note that effect, and the two above electrical shaders are also used with Force Lightning, electrical trigger_damage's, and anything else that plays with electricity.)
Again, pulse nades suck, visual effects + code-wise.