Hi,
I’m trying to make a little clientside mod.
This mod should give some graphical feedback of used “powerups” (invulnerability and adrenaline).
Proble:
It isn’t working (actually the game isn’t starting at all / the game hangs up with no feedback).
Here are the changes:
“cgame/cg_main.c” line ~ 1959 (in function “CG_RegisterGraphics”):
cgs.media.AdrenalineWeaponShader = trap_R_RegisterShader("powerups/AdrenalineWeapon");
cgs.media.InvulnerableWeaponShader = trap_R_RegisterShader("powerups/InvulnerableWeapon");
cgame/cgweapons.c - line ~ 1976 (in function “CG_AddWeaponWithPowerups”):
if ( powerups & ( 1 << PW_ADRENALINE ) )
{
gun->customShader = cgs.media.AdrenalineWeaponShader;
}
else if ( powerups & ( 1 << PW_INVULNERABLE ) )
{
gun->customShader = cgs.media.InvulnerableWeaponShader;
}
trap_R_AddRefEntityToScene( gun );
The shader:
powerups/AdrenalineWeapon
{
deformVertexes wave 100 sin 0.5 0 0 0
{
map textures/effects/adrenalinered.tga
blendfunc GL_ONE GL_ONE
tcGen environment
tcmod rotate 30
//tcMod turb 0 0.2 0 .2
tcmod scroll 1 .1
}
}
powerups/InvulnerableWeapon
{
deformVertexes wave 100 sin 0.5 0 0 0
{
map textures/effects/invulnerableblue.tga
blendfunc GL_ONE GL_ONE
tcGen environment
tcmod rotate 30
//tcMod turb 0 0.2 0 .2
tcmod scroll 1 .1
}
}
The “powerups.pk3”-file contains the “cgame_mp_x86.dll” (also unzipped to the “etmain” directory), the “scipts/powerups.shader”, the “textures/effects/adrenalinered.jpg” and the “textures/effects/invulnerableblue.jpg”.
The server is started unpure.
Any help would be much appreciated.
Note:
This is only a test with the shaders for the weapons.
I will try to add these shaders also to the playermodels.
Second note:
Some of the code parts, the shaders, and the textures are taken from Q3.





