Pages: [1]
  Print  
Author Topic: Help, I borked the lightning gun. It shoots white squares.  (Read 324 times)
Jakash3
Half-Nub


Cakes -1
Posts: 57


« on: August 22, 2012, 09:42:51 pm »

I was modding the engine and made a gun that was the same as the lightning gun except it had a different skin, range, and damage level.  I think I screwed something up after compiling. Now everytime I shoot the lg or my new weapon at the wall or ground, I get white squares spinning where it's hitting at the surface.

I'm kind of an amateur at this. I think this has something to do with the lightningExplosionModel set in the CG_RegisterWeapon function in cg_weapons.c. It loads to models/weaphits/crackle.md3. And that model references the lightnnFlash shader. Well it looks like lightnnFlash loads models/weapons2/lightning/f_lightning.tga. But f_lightning.tga does not exist, not even in baseoa.

So my question is: which part of the engine loads the model for the lg laser hitting the wall/ground?
Logged
Jakash3
Half-Nub


Cakes -1
Posts: 57


« Reply #1 on: August 23, 2012, 05:54:28 pm »

I think I solved the problem. I added cgs.media.flameExplosionShader = trap_R_RegisterShader( "rocketExplosion" ); under WP_LIGHTNING label in the weaponNum switch statement in CG_RegisterWeapon(). I still don't get why the rocketexplosion shader has to be loaded in order for the lightning to work.
Logged
Pages: [1]
  Print  
 
Jump to: