Skip to content

Commit

Permalink
cgame: Add antigrav rock particles, make some adjustments to the othe…
Browse files Browse the repository at this point in the history
…r particles and add rock and smoke particle shaders
  • Loading branch information
LegendaryGuard committed Feb 2, 2024
1 parent 0f84330 commit 74b0df5
Show file tree
Hide file tree
Showing 3 changed files with 196 additions and 156 deletions.
11 changes: 10 additions & 1 deletion source/cgame/cg_local.h
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,14 @@ typedef struct {

qhandle_t invulnerabilityPowerupModel;

qhandle_t auraModel; // BFP - Aura model
// BFP - Particle shaders
qhandle_t pebbleShader1;
qhandle_t pebbleShader2;
qhandle_t pebbleShader3;
qhandle_t particleSmokeShader;

// BFP - Aura models
qhandle_t auraModel; // BFP - Normal aura model
qhandle_t backauraModel; // BFP - Back aura model
qhandle_t flyauraModel; // BFP - Fly aura model
qhandle_t runauraModel; // BFP - Run aura model
Expand Down Expand Up @@ -1492,6 +1499,8 @@ void CG_ParticleExplosion (char *animStr, vec3_t origin, vec3_t vel, int duratio
void CG_ParticleBubble (centity_t *cent, qhandle_t pshader, vec3_t origin, vec3_t origin2, int turb, float range, int snum);
// BFP - Dash smoke particle for ki boost when moving in the ground
void CG_ParticleDashSmoke (centity_t *cent, qhandle_t pshader, vec3_t origin);
// BFP - Antigrav rock particles for charging
void CG_ParticleAntigravRock (qhandle_t pshader, centity_t *cent, vec3_t origin);
extern qboolean initparticles;
int CG_NewParticleArea ( int num );

Expand Down
10 changes: 9 additions & 1 deletion source/cgame/cg_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -618,10 +618,12 @@ static void CG_RegisterGraphics( void ) {
cgs.media.medalAssist = trap_R_RegisterShaderNoMip( "medal_assist" );
cgs.media.medalCapture = trap_R_RegisterShaderNoMip( "medal_capture" );

cgs.media.auraModel = trap_R_RegisterModel( "models/effects/aura.md3" ); // BFP - Aura model
// BFP - Aura models
cgs.media.auraModel = trap_R_RegisterModel( "models/effects/aura.md3" ); // BFP - Normal aura model
cgs.media.backauraModel = trap_R_RegisterModel( "models/effects/backaura.md3" ); // BFP - Back aura model
cgs.media.flyauraModel = trap_R_RegisterModel( "models/effects/flyaura.md3" ); // BFP - Fly aura model
cgs.media.runauraModel = trap_R_RegisterModel( "models/effects/runaura.md3" ); // BFP - Run aura model

// BFP - Aura shaders
cgs.media.auraBlueShader = trap_R_RegisterShader( "powerups/bluetiny" );
cgs.media.auraRedShader = trap_R_RegisterShader( "powerups/redtiny" );
Expand Down Expand Up @@ -649,6 +651,12 @@ static void CG_RegisterGraphics( void ) {
cgs.media.wakeMarkShader = trap_R_RegisterShader( "wake" );
cgs.media.bloodMarkShader = trap_R_RegisterShader( "bloodMark" );

// BFP - Particle shaders
cgs.media.pebbleShader1 = trap_R_RegisterShader( "pebbleShader1" ); // BFP - Rock particles for charging and explosion
cgs.media.pebbleShader2 = trap_R_RegisterShader( "pebbleShader2" ); // BFP - Rock particles for charging and explosion
cgs.media.pebbleShader3 = trap_R_RegisterShader( "pebbleShader3" ); // BFP - Rock particles for charging and explosion
cgs.media.particleSmokeShader = trap_R_RegisterShader( "particleSmokeShader" ); // BFP - Smoke particle when using ki boost in the ground and for the explosion

// register the inline models
cgs.numInlineModels = trap_CM_NumInlineModels();
for ( i = 1 ; i < cgs.numInlineModels ; i++ ) {
Expand Down
Loading

0 comments on commit 74b0df5

Please sign in to comment.