summaryrefslogtreecommitdiff
path: root/src/cgame
diff options
context:
space:
mode:
Diffstat (limited to 'src/cgame')
-rw-r--r--src/cgame/cg_buildable.c22
-rw-r--r--src/cgame/cg_event.c1
-rw-r--r--src/cgame/cg_main.c4
-rw-r--r--src/cgame/cg_predict.c2
-rw-r--r--src/cgame/cg_scanner.c2
-rw-r--r--src/cgame/cg_servercmds.c2
-rw-r--r--src/cgame/cg_view.c6
-rw-r--r--src/cgame/cg_weapons.c1
8 files changed, 12 insertions, 28 deletions
diff --git a/src/cgame/cg_buildable.c b/src/cgame/cg_buildable.c
index 5646f90..9b1d8d4 100644
--- a/src/cgame/cg_buildable.c
+++ b/src/cgame/cg_buildable.c
@@ -194,8 +194,7 @@ void CG_DrawCuboid( vec3_t origin, vec3_t dims, qhandle_t shader, int margin )
void CG_DrawCuboidAxis(vec3_t cuboidOrigin, vec3_t size, int axis, qhandle_t shader)
{
vec3_t origin, localZ, localX, localY, start, end, quad[2][4];
- float len, width;
- polyVert_t poly[4];
+ float len;
VectorCopy(cuboidOrigin,origin);
origin[2]+=size[2]/2.0f;
@@ -273,7 +272,7 @@ void CG_InitCuboidExplosions(void)
void CG_CuboidExplosion(buildable_t buildable, vec3_t origin, vec3_t dims)
{
- int i,p,m,q;
+ int i,p,q;
float v,s;
cuboidParticle_t *pc;
vec3_t sdims;
@@ -301,7 +300,7 @@ void CG_CuboidExplosion(buildable_t buildable, vec3_t origin, vec3_t dims)
p=ceil(sqrt(v/pow(sdims[2],3)))*2;
else if(q==2)
p=ceil(pow(v/pow(sdims[2],3),0.75f))*3;
- else if(q>=3)
+ else
p=ceil(pow(v/pow(sdims[2],3),0.85f))*6;
p=MIN(p,MAX_CPARTICLES_PER_EXPLOSION);
@@ -363,9 +362,8 @@ void CG_CuboidParticlePhysics(cuboidParticle_t *pc)
void CG_DrawCuboidParticles(void)
{
- int i,j,drawn=0,c;
- float t;
- vec3_t alight, dlight, lightdir, newOrigin;
+ int i,j,drawn=0;
+ //vec3_t alight, dlight, lightdir;
cuboidParticle_t *pc;
refEntity_t re;
@@ -687,8 +685,6 @@ void CG_InitBuildables( void )
fileHandle_t f;
pc_token_t token;
cuboidInfo_t *cuboid;
- const char *s;
- float n;
memset( cg_buildables, 0, sizeof( cg_buildables ) );
@@ -1095,7 +1091,7 @@ void CG_GhostBuildable( buildable_t buildable, vec3_t dims )
if(BG_Buildable(buildable, NULL)->cuboid)
{
- qhandle_t shader, ashader;
+ qhandle_t shader;
CG_Cuboid_Send( ); //NOTE: CG_Cuboid_Send has its own timer so we don't spam server with commands every frame
@@ -1832,7 +1828,7 @@ void CG_Buildable( centity_t *cent )
prebuildSound = cgs.media.unpoweredSurgeLoop;
}
}
- else if( team == TEAM_ALIENS )
+ else
{
texture = cgs.media.cuboidAlienPrebuild;
prebuildSound = cgs.media.alienBuildablePrebuild;
@@ -2318,8 +2314,6 @@ Syntax:
#define SWAPFLOATS(a,b) {float __t;__t=a,a=b,b=__t;}
void CG_CuboidRotate_f(void)
{
- int axis;
-
if( !BG_Buildable( cg.predictedPlayerState.stats[ STAT_BUILDABLE ] & ~SB_VALID_TOGGLEBIT, NULL )->cuboid )
return;
switch( cg_cuboidResizeAxis.integer )
@@ -2378,8 +2372,6 @@ Syntax:
*/
void CG_CuboidSize_f(void)
{
- int axis;
-
if( trap_Argc( ) < 4 )
{
Com_Printf( "cuboidAxis x y z : set the cuboid selection\n" );
diff --git a/src/cgame/cg_event.c b/src/cgame/cg_event.c
index adc319c..a364a46 100644
--- a/src/cgame/cg_event.c
+++ b/src/cgame/cg_event.c
@@ -491,7 +491,6 @@ void CG_EntityEvent( centity_t *cent, vec3_t position )
int clientNum;
clientInfo_t *ci;
int steptime;
- vec3_t cuboid;
buildable_t cuboidType;
if( cg.snap->ps.persistant[ PERS_SPECSTATE ] != SPECTATOR_NOT )
diff --git a/src/cgame/cg_main.c b/src/cgame/cg_main.c
index 7c798a2..ef69ea8 100644
--- a/src/cgame/cg_main.c
+++ b/src/cgame/cg_main.c
@@ -654,7 +654,6 @@ static void CG_RegisterSounds( void )
int i;
char name[ MAX_QPATH ];
const char *soundName;
- const cuboidAttributes_t *cuboid;
cgs.media.alienStageTransition = trap_S_RegisterSound( "sound/announcements/overmindevolved.wav", qtrue );
cgs.media.humanStageTransition = trap_S_RegisterSound( "sound/announcements/reinforcement.wav", qtrue );
@@ -779,8 +778,7 @@ This function may execute for a couple of minutes with a slow disk.
*/
static void CG_RegisterGraphics( void )
{
- int i,j;
- const cuboidAttributes_t *cuboid;
+ int i;
static char *sb_nums[ 11 ] =
{
diff --git a/src/cgame/cg_predict.c b/src/cgame/cg_predict.c
index f0fbbd5..12a0dc0 100644
--- a/src/cgame/cg_predict.c
+++ b/src/cgame/cg_predict.c
@@ -98,8 +98,6 @@ static void CG_ClipMoveToEntities ( const vec3_t start, const vec3_t mins,
vec3_t bmins, bmaxs;
vec3_t origin, angles;
centity_t *cent;
- vec3_t dims;
- vec3_t size;
//SUPAR HACK
//this causes a trace to collide with the local player
diff --git a/src/cgame/cg_scanner.c b/src/cgame/cg_scanner.c
index 821c8bf..e95dd53 100644
--- a/src/cgame/cg_scanner.c
+++ b/src/cgame/cg_scanner.c
@@ -223,7 +223,7 @@ CG_BasivisionBlip
*/
void CG_BasivisionBlip( vec3_t origin, float size, qhandle_t shader, float flareSize, qhandle_t flare )
{
- float x, y, s;
+ float x, y;
if( !CG_WorldToScreen( origin, &x, &y ) )
return;
diff --git a/src/cgame/cg_servercmds.c b/src/cgame/cg_servercmds.c
index f9a173a..83aaa53 100644
--- a/src/cgame/cg_servercmds.c
+++ b/src/cgame/cg_servercmds.c
@@ -1101,7 +1101,7 @@ static void CG_ParseVoice( void )
return;
vChan = atoi( CG_Argv( 2 ) );
- if( vChan < 0 || vChan >= VOICE_CHAN_NUM_CHANS )
+ if( (int)vChan < 0 || vChan >= VOICE_CHAN_NUM_CHANS )
return;
if( cg_teamChatsOnly.integer && vChan != VOICE_CHAN_TEAM )
diff --git a/src/cgame/cg_view.c b/src/cgame/cg_view.c
index 97b7582..0feebc8 100644
--- a/src/cgame/cg_view.c
+++ b/src/cgame/cg_view.c
@@ -581,7 +581,7 @@ void CG_OffsetFirstPersonView( void )
// camera shake effect
else if( cg.snap->ps.stats[ STAT_SHAKE ] > 0 )
{
- float fac, mag;
+ float fac;
fac = (float) cg.snap->ps.stats[ STAT_SHAKE ] *
cg_cameraShakeMagnitude.value * 0.15f;
@@ -944,9 +944,7 @@ static int CG_CalcFov( void )
{
f = ( cg.time - cg.zoomTime ) / (float)ZOOM_TIME;
- if ( f > 1.0f )
- fov_y = fov_y;
- else
+ if ( f <= 1.0f )
fov_y = zoomFov + f * ( fov_y - zoomFov );
// BUTTON_ATTACK2 is held so zoom next time
diff --git a/src/cgame/cg_weapons.c b/src/cgame/cg_weapons.c
index b3dd4c7..55ad649 100644
--- a/src/cgame/cg_weapons.c
+++ b/src/cgame/cg_weapons.c
@@ -1404,7 +1404,6 @@ void CG_AddViewWeapon( playerState_t *ps )
weaponInfo_t *wi;
weapon_t weapon = ps->weapon;
weaponMode_t weaponMode = ps->generic1;
- vec3_t cuboidSize;
// no weapon carried - can't draw it
if( weapon == WP_NONE )