diff options
Diffstat (limited to 'src/cgame')
-rw-r--r-- | src/cgame/cg_ents.c | 3 | ||||
-rw-r--r-- | src/cgame/cg_local.h | 13 | ||||
-rw-r--r-- | src/cgame/cg_main.c | 11 | ||||
-rw-r--r-- | src/cgame/cg_servercmds.c | 4 |
4 files changed, 30 insertions, 1 deletions
diff --git a/src/cgame/cg_ents.c b/src/cgame/cg_ents.c index 62920756..d145f387 100644 --- a/src/cgame/cg_ents.c +++ b/src/cgame/cg_ents.c @@ -953,6 +953,9 @@ static void CG_AddCEntity( centity_t *cent ) { case ET_GRAPPLE: CG_Grapple( cent ); break; + case ET_SPRITER: + CG_Spriter( cent ); + break; } } diff --git a/src/cgame/cg_local.h b/src/cgame/cg_local.h index 0a672504..9f701bc8 100644 --- a/src/cgame/cg_local.h +++ b/src/cgame/cg_local.h @@ -220,6 +220,7 @@ typedef enum { LE_SPRITE_EXPLOSION, LE_FRAGMENT, LE_MOVE_SCALE_FADE, + LE_SPRITER, LE_FALL_SCALE_FADE, LE_FADE_RGB, LE_SCALE_FADE @@ -272,6 +273,12 @@ typedef struct localEntity_s { leBounceSoundType_t leBounceSoundType; refEntity_t refEntity; + + //TA: random stuff for cg_spriter.c + vec3_t acceleration; + float initAlp, finalAlp; + float initRad, finalRad; + qboolean overdraw; } localEntity_t; //====================================================================== @@ -1025,6 +1032,7 @@ typedef struct { // locally derived information from gamestate // qhandle_t gameModels[MAX_MODELS]; + qhandle_t gameShaders[MAX_SHADERS]; sfxHandle_t gameSounds[MAX_SOUNDS]; int numInlineModels; @@ -1328,6 +1336,11 @@ void CG_Buildable( centity_t *cent ); void CG_InitBuildables( ); // +// cg_spriter.c +// +void CG_Spriter( centity_t *cent ); + +// // cg_predict.c // void CG_BuildSolidList( void ); diff --git a/src/cgame/cg_main.c b/src/cgame/cg_main.c index 2cdc9149..35a6022b 100644 --- a/src/cgame/cg_main.c +++ b/src/cgame/cg_main.c @@ -907,6 +907,17 @@ static void CG_RegisterGraphics( void ) { cgs.gameModels[i] = trap_R_RegisterModel( modelName ); } + // register all the server specified shaders + for (i=1 ; i<MAX_SHADERS ; i++) { + const char *shaderName; + + shaderName = CG_ConfigString( CS_SHADERS+i ); + if ( !shaderName[0] ) { + break; + } + cgs.gameShaders[i] = trap_R_RegisterShader( shaderName ); + } + CG_ClearParticles (); } diff --git a/src/cgame/cg_servercmds.c b/src/cgame/cg_servercmds.c index ed0a7956..65e09cd5 100644 --- a/src/cgame/cg_servercmds.c +++ b/src/cgame/cg_servercmds.c @@ -314,7 +314,9 @@ static void CG_ConfigStringModified( void ) { cg.intermissionStarted = atoi( str ); } else if ( num >= CS_MODELS && num < CS_MODELS+MAX_MODELS ) { cgs.gameModels[ num-CS_MODELS ] = trap_R_RegisterModel( str ); - } else if ( num >= CS_SOUNDS && num < CS_SOUNDS+MAX_MODELS ) { + } else if ( num >= CS_SHADERS && num < CS_SHADERS+MAX_SHADERS ) { + cgs.gameShaders[ num-CS_SHADERS ] = trap_R_RegisterShader( str ); + } else if ( num >= CS_SOUNDS && num < CS_SOUNDS+MAX_SOUNDS ) { if ( str[0] != '*' ) { // player specific sounds don't register here cgs.gameSounds[ num-CS_SOUNDS] = trap_S_RegisterSound( str, qfalse ); } |