Jump to content

Blaster pistol charge GFX


Go to solution Solved by Asgarath83,

Recommended Posts

Ok ... i want to change this effect. BUT I dont want to change the bryarfrontflash.jpg. I want to change it but with effect file. But it doesnt work . I changed the altmuzzle_flash effect but there is no changes.

I changed the look of this from yellow to red... But it messed up many others effect.

Link to comment
  • Solution

it's not an efx. 

as force protect, absorb and force sight are shaders strongly hardcoded.

Mmm i suppose is hardcoded on the SP\Mp code and using a shader spotted on the tag_flash of the weapon model. you need to change this with code, using a different shader for the specific effect. :) i not know in which part of code is this shader, but me too need to change shaders for alt fire of blaster_pistol, demp2 and bowcaster. 

So if you found, please, share with me the code part of that. :)

I thinki you need to find into the code the name of the shader used for bryar effect, so in the explore solution, tipe complete path of the ggfx used. you can see all code parts about this shader. locate the lines about altfire displaying shader of blaster pistol and change with another shader added to your mod. so the edit not overwrite nothing. :)

Link to comment

Sry for swear... FUCK

 

Another goddamn Thing i cant change because it is hardcoded TnT This game dont like me....

If you want i build a SP with Open Jk master with the changed shader. tell me the path and name you want. :)

However, yes. is pretty sad is not possible to add by external data force powers and weapons. some thing of the JKA cannot be easily modded because are coded in the code. :(

Link to comment

cg_players.cpp on SP code. FOUND IT! :D

 

//FIXME: for debug, allow to draw a cone of the NPC's FOV...
if ( cent->currentState.number == 0 && cg.renderingThirdPerson )
{
playerState_t *ps = &cg.predicted_player_state;

if (( ps->weaponstate == WEAPON_CHARGING_ALT && ps->weapon == WP_BRYAR_PISTOL )
|| ( ps->weaponstate == WEAPON_CHARGING_ALT && ps->weapon == WP_BLASTER_PISTOL )
|| ( ps->weapon == WP_BOWCASTER && ps->weaponstate == WEAPON_CHARGING )
|| ( ps->weapon == WP_DEMP2 && ps->weaponstate == WEAPON_CHARGING_ALT ))
{
int shader = 0;
float val = 0.0f, scale = 1.0f;
vec3_t WHITE = {1.0f,1.0f,1.0f};

if ( ps->weapon == WP_BRYAR_PISTOL
|| ps->weapon == WP_BLASTER_PISTOL )
{
// Hardcoded max charge time of 1 second
val = ( cg.time - ps->weaponChargeTime ) * 0.001f;
shader = cgi_R_RegisterShader( "gfx/effects/bryarFrontFlash" );
}
else if ( ps->weapon == WP_BOWCASTER )
{
// Hardcoded max charge time of 1 second
val = ( cg.time - ps->weaponChargeTime ) * 0.001f;
shader = cgi_R_RegisterShader( "gfx/effects/greenFrontFlash" );
}
else if ( ps->weapon == WP_DEMP2 )
{
// Hardcoded max charge time of 1 second
val = ( cg.time - ps->weaponChargeTime ) * 0.001f;
shader = cgi_R_RegisterShader( "gfx/misc/lightningFlash" );
scale = 1.75f;
}

if ( val < 0.0f )
{
val = 0.0f;
}
else if ( val > 1.0f )
{
val = 1.0f;
CGCam_Shake( 0.1f, 100 );
}
else
{
CGCam_Shake( val * val * 0.3f, 100 );
}

val += random() * 0.5f;

FX_AddSprite( cent->gent->client->renderInfo.muzzlePoint, NULL, NULL, 3.0f * val * scale, 0.0f, 0.7f, 0.7f, WHITE, WHITE, random() * 360, 0.0f, 1.0f, shader, FX_USE_ALPHA );
}
}
Link to comment

Need to be changed in:

weaponinit.c for add a new register shader.

cg_playersc.cpp and cg_weapons.cpp for change the shader spotted.

(the line code are similars.)

Also, you need to add the new shader into a .SHADER file. :)

So make me a new shader file and send me the mod with shader file and the gfx image you desire to use, and i build a solution for you for use that. :)

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...