diff options
author | Mikko Tiusanen <ams@daug.net> | 2015-01-25 23:47:16 +0200 |
---|---|---|
committer | Mikko Tiusanen <ams@daug.net> | 2015-01-25 23:47:16 +0200 |
commit | 56382169c394bc6a1e63a91fdd59b58ac3974986 (patch) | |
tree | ca7b9e762d4dfc7a11bc01e7dcbe072f465dc343 /src | |
parent | 67948a489d2a07b94b6d5a3eeb2b642146865a61 (diff) |
Fixed compiler warnings in all game, cgame sources.
Diffstat (limited to 'src')
-rw-r--r-- | src/cgame/cg_buildable.c | 6 | ||||
-rw-r--r-- | src/cgame/cg_draw.c | 36 | ||||
-rw-r--r-- | src/cgame/cg_ents.c | 4 | ||||
-rw-r--r-- | src/cgame/cg_event.c | 2 | ||||
-rw-r--r-- | src/cgame/cg_local.h | 2 | ||||
-rw-r--r-- | src/cgame/cg_playerstate.c | 4 | ||||
-rw-r--r-- | src/cgame/cg_predict.c | 6 | ||||
-rw-r--r-- | src/cgame/cg_view.c | 12 | ||||
-rw-r--r-- | src/cgame/cg_weapons.c | 4 | ||||
-rw-r--r-- | src/game/bg_pmove.c | 3 | ||||
-rw-r--r-- | src/game/bg_slidemove.c | 6 | ||||
-rw-r--r-- | src/game/edge_version.h | 2 | ||||
-rw-r--r-- | src/game/g_active.c | 18 | ||||
-rw-r--r-- | src/game/g_admin.c | 4 | ||||
-rw-r--r-- | src/game/g_buildable.c | 13 | ||||
-rw-r--r-- | src/game/g_cmds.c | 8 | ||||
-rw-r--r-- | src/game/g_combat.c | 12 | ||||
-rw-r--r-- | src/game/g_local.h | 22 | ||||
-rw-r--r-- | src/game/g_main.c | 14 | ||||
-rw-r--r-- | src/game/g_missile.c | 25 | ||||
-rw-r--r-- | src/game/g_session.c | 8 | ||||
-rw-r--r-- | src/game/g_team.c | 2 | ||||
-rw-r--r-- | src/game/g_weapon.c | 38 |
23 files changed, 124 insertions, 127 deletions
diff --git a/src/cgame/cg_buildable.c b/src/cgame/cg_buildable.c index 909615f..5ecdafb 100644 --- a/src/cgame/cg_buildable.c +++ b/src/cgame/cg_buildable.c @@ -75,12 +75,12 @@ void CG_AlienBuildableExplosion( vec3_t origin, vec3_t dir, int buildable ) /* =================== -CG_AlienSPITEFUL_ABCESSExplosion +CG_AlienSpitefulAbcessExplosion Generated a bunch of gibs launching out from a location =================== */ -void CG_AlienSPITEFUL_ABCESSExplosion( vec3_t origin, vec3_t dir ) +void CG_AlienSpitefulAbcessExplosion( vec3_t origin, vec3_t dir ) { particleSystem_t *ps; @@ -141,7 +141,7 @@ static void CG_Creep( centity_t *cent ) vec3_t temp, origin; int scaleUpTime = BG_Buildable( cent->currentState.modelindex )->buildTime; int time; - int creepSize; + // int creepSize; time = cent->currentState.time; //should the creep be growing or receding? diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c index 8e0b88f..e3af715 100644 --- a/src/cgame/cg_draw.c +++ b/src/cgame/cg_draw.c @@ -501,12 +501,12 @@ static void CG_DrawPlayerBuildTimerRing( rectDef_t *rect, vec4_t backColor, vec4_t foreColor, qhandle_t shader ) { playerState_t *ps = &cg.snap->ps; - centity_t *cent; + // centity_t *cent; float buildTime = ps->stats[ STAT_MISC ]; float progress; vec4_t color; - cent = &cg_entities[ cg.snap->ps.clientNum ]; + // cent = &cg_entities[ cg.snap->ps.clientNum ]; if( buildTime > MAXIMUM_BUILD_TIME ) buildTime = MAXIMUM_BUILD_TIME; @@ -887,7 +887,7 @@ static void CG_DrawPlayerAmmoValue( rectDef_t *rect, vec4_t color ) { float tx, ty; char *text; - int len; + // int len; trap_R_SetColor( color ); if( !bp ) @@ -921,7 +921,7 @@ static void CG_DrawPlayerAmmoValue( rectDef_t *rect, vec4_t color ) { float tx, ty; char *text; - int len; + // int len; trap_R_SetColor( color ); if( !bp ) @@ -1434,11 +1434,11 @@ static void CG_DrawLevelShot( rectDef_t *rect ) static void CG_DrawEdgeShot( rectDef_t *rect ) { - const char *info; + // const char *info; qhandle_t pic; - info = CG_ConfigString( CS_SERVERINFO ); + // info = CG_ConfigString( CS_SERVERINFO ); pic = trap_R_RegisterShaderNoMip( "ui/assets/warp_splash" ); trap_R_SetColor( NULL ); @@ -1552,11 +1552,11 @@ void CG_DrawLoadingScreen( void ) float CG_GetValue( int ownerDraw ) { - centity_t *cent; + // centity_t *cent; playerState_t *ps; weapon_t weapon; - cent = &cg_entities[ cg.snap->ps.clientNum ]; + // cent = &cg_entities[ cg.snap->ps.clientNum ]; ps = &cg.snap->ps; weapon = BG_GetPlayerWeapon( ps ); @@ -2290,12 +2290,12 @@ static void CG_DrawClock( rectDef_t *rect, float text_x, float text_y, int i, strLength; float w, h, totalWidth; qtime_t qt; - int t; + // int t; if( !cg_drawClock.integer ) return; - t = trap_RealTime( &qt ); + /*t = */trap_RealTime( &qt ); if( cg_drawClock.integer == 2 ) { @@ -2819,11 +2819,11 @@ CG_DrawWeaponIcon void CG_DrawWeaponIcon( rectDef_t *rect, vec4_t color ) { int maxAmmo; - centity_t *cent; + // centity_t *cent; playerState_t *ps; weapon_t weapon; - cent = &cg_entities[ cg.snap->ps.clientNum ]; + // cent = &cg_entities[ cg.snap->ps.clientNum ]; ps = &cg.snap->ps; weapon = BG_GetPlayerWeapon( ps ); @@ -2898,7 +2898,7 @@ static void CG_DrawCrosshair( rectDef_t *rect, vec4_t color ) float x, y; weaponInfo_t *wi; weapon_t weapon; - weapon_t curWeapon = WP_NONE; + // weapon_t curWeapon = WP_NONE; weapon = BG_GetPlayerWeapon( &cg.snap->ps ); @@ -3469,9 +3469,9 @@ CG_DrawLighting */ static void CG_DrawLighting( void ) { - centity_t *cent; + // centity_t *cent; - cent = &cg_entities[ cg.snap->ps.clientNum ]; + // cent = &cg_entities[ cg.snap->ps.clientNum ]; //fade to black if stamina is low if( ( cg.snap->ps.stats[ STAT_STAMINA ] < STAMINA_BLACKOUT_LEVEL ) && @@ -3671,7 +3671,7 @@ static void CG_DrawVote( team_t team ) static qboolean CG_DrawScoreboard( void ) { static qboolean firstTime = qtrue; - float fade, *fadeColor; + // float fade, *fadeColor; if( menuScoreboard ) menuScoreboard->window.flags &= ~WINDOW_FORCED; @@ -3686,8 +3686,8 @@ static qboolean CG_DrawScoreboard( void ) if( cg.showScores || cg.predictedPlayerState.pm_type == PM_INTERMISSION ) { - fade = 1.0; - fadeColor = colorWhite; + // fade = 1.0; + // fadeColor = colorWhite; } else { diff --git a/src/cgame/cg_ents.c b/src/cgame/cg_ents.c index 7b27579..a9663ad 100644 --- a/src/cgame/cg_ents.c +++ b/src/cgame/cg_ents.c @@ -836,7 +836,7 @@ void CG_AdjustPositionForMover( const vec3_t in, int moverNum, int fromTime, int { centity_t *cent; vec3_t oldOrigin, origin, deltaOrigin; - vec3_t oldAngles, angles, deltaAngles; + vec3_t oldAngles, angles/*, deltaAngles*/; if( moverNum <= 0 || moverNum >= ENTITYNUM_MAX_NORMAL ) { @@ -859,7 +859,7 @@ void CG_AdjustPositionForMover( const vec3_t in, int moverNum, int fromTime, int BG_EvaluateTrajectory( ¢->currentState.apos, toTime, angles ); VectorSubtract( origin, oldOrigin, deltaOrigin ); - VectorSubtract( angles, oldAngles, deltaAngles ); + // VectorSubtract( angles, oldAngles, deltaAngles ); VectorAdd( in, deltaOrigin, out ); diff --git a/src/cgame/cg_event.c b/src/cgame/cg_event.c index 4dc548f..8ebb5af 100644 --- a/src/cgame/cg_event.c +++ b/src/cgame/cg_event.c @@ -1024,7 +1024,7 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) CG_AlienBuildableExplosion( position, dir, es->modelindex ); if ( es->modelindex == BA_A_SPITEFUL_ABCESS ) - CG_AlienSPITEFUL_ABCESSExplosion( position, dir ); + CG_AlienSpitefulAbcessExplosion( position, dir ); CG_InduceViewQuake( position, BUILDABLE_EXPLOSION_QUAKE ); break; diff --git a/src/cgame/cg_local.h b/src/cgame/cg_local.h index ab3e9e6..5816a9b 100644 --- a/src/cgame/cg_local.h +++ b/src/cgame/cg_local.h @@ -1726,7 +1726,7 @@ void CG_DrawBuildableStatus( void ); void CG_InitBuildables( void ); void CG_HumanBuildableExplosion( vec3_t origin, vec3_t dir, int buildable ); void CG_AlienBuildableExplosion( vec3_t origin, vec3_t dir, int buildable ); - +void CG_AlienSpitefulAbcessExplosion( vec3_t origin, vec3_t dir ); void CG_DrawChatBubble( void ); int CG_SortDistance( const void *a, const void *b ); diff --git a/src/cgame/cg_playerstate.c b/src/cgame/cg_playerstate.c index 8a8e739..a6cd2a3 100644 --- a/src/cgame/cg_playerstate.c +++ b/src/cgame/cg_playerstate.c @@ -245,7 +245,7 @@ CG_CheckLocalSounds */ void CG_CheckLocalSounds( playerState_t *ps, playerState_t *ops ) { - int reward; + // int reward; // don't play the sounds if the player just spawned if( ps->persistant[ PERS_SPECSTATE ] != ops->persistant[ PERS_SPECSTATE ] ) @@ -264,7 +264,7 @@ void CG_CheckLocalSounds( playerState_t *ps, playerState_t *ops ) return; // reward sounds - reward = qfalse; + // reward = qfalse; } diff --git a/src/cgame/cg_predict.c b/src/cgame/cg_predict.c index 5b29250..9baab8b 100644 --- a/src/cgame/cg_predict.c +++ b/src/cgame/cg_predict.c @@ -572,7 +572,7 @@ void CG_PredictPlayerState( void ) { int cmdNum, current, i; playerState_t oldPlayerState; - qboolean moved; + // qboolean moved; usercmd_t oldestCmd; usercmd_t latestCmd; int stateIndex = 0, predictCmd = 0; @@ -759,7 +759,7 @@ void CG_PredictPlayerState( void ) } // run cmds - moved = qfalse; + // moved = qfalse; for( cmdNum = current - CMD_BACKUP + 1; cmdNum <= current; cmdNum++ ) { @@ -878,7 +878,7 @@ void CG_PredictPlayerState( void ) stateIndex = ( stateIndex + 1 ) % NUM_SAVED_STATES; } - moved = qtrue; + // moved = qtrue; // add push trigger movement effects CG_TouchTriggerPrediction( ); diff --git a/src/cgame/cg_view.c b/src/cgame/cg_view.c index eb6e88d..1221fe9 100644 --- a/src/cgame/cg_view.c +++ b/src/cgame/cg_view.c @@ -579,7 +579,7 @@ void CG_OffsetFirstPersonView( void ) vec3_t predictedVelocity; int timeDelta; float bob2; - vec3_t normal, baseOrigin; + vec3_t normal/*, baseOrigin*/; playerState_t *ps = &cg.predictedPlayerState; BG_GetClientNormal( ps, normal ); @@ -590,7 +590,7 @@ void CG_OffsetFirstPersonView( void ) origin = cg.refdef.vieworg; angles = cg.refdefViewAngles; - VectorCopy( origin, baseOrigin ); + // VectorCopy( origin, baseOrigin ); // if dead, fix the angle and don't add any kick if( cg.snap->ps.stats[ STAT_HEALTH ] <= 0 ) @@ -738,7 +738,7 @@ void CG_OffsetFirstPersonView( void ) usercmd_t cmd; int cmdNum; float fFraction, rFraction, uFraction; - float fFraction2, rFraction2, uFraction2; + // float fFraction2, rFraction2, uFraction2; cmdNum = trap_GetCurrentCmdNumber(); trap_GetUserCmd( cmdNum, &cmd ); @@ -756,9 +756,9 @@ void CG_OffsetFirstPersonView( void ) if( uFraction > 1.0f ) uFraction = 1.0f; - fFraction2 = -sin( fFraction * M_PI / 2 ); - rFraction2 = -sin( rFraction * M_PI / 2 ); - uFraction2 = -sin( uFraction * M_PI / 2 ); + // fFraction2 = -sin( fFraction * M_PI / 2 ); + // rFraction2 = -sin( rFraction * M_PI / 2 ); + // uFraction2 = -sin( uFraction * M_PI / 2 ); if( cmd.forwardmove > 0 ) VectorMA( origin, STRUGGLE_DIST * fFraction, forward, origin ); diff --git a/src/cgame/cg_weapons.c b/src/cgame/cg_weapons.c index 8e3b438..520d40a 100644 --- a/src/cgame/cg_weapons.c +++ b/src/cgame/cg_weapons.c @@ -1478,10 +1478,10 @@ void CG_DrawItemSelect( rectDef_t *rect, vec4_t color ) int numItems = 0, selectedItem = 0; int length; qboolean vertical; - centity_t *cent; + // centity_t *cent; playerState_t *ps; - cent = &cg_entities[ cg.snap->ps.clientNum ]; + // cent = &cg_entities[ cg.snap->ps.clientNum ]; ps = &cg.snap->ps; // don't display if dead diff --git a/src/game/bg_pmove.c b/src/game/bg_pmove.c index 9728ff0..017b389 100644 --- a/src/game/bg_pmove.c +++ b/src/game/bg_pmove.c @@ -771,6 +771,7 @@ static qboolean PM_CheckAirPounce( void ) if( pm->ps->weapon == WP_ALEVEL5 ) jumpMagnitude = pm->ps->stats[ STAT_MISC ] * LEVEL5_POUNCE_JUMP_MAG / LEVEL5_POUNCE_TIME; + else jumpMagnitude = 0; VectorMA( pm->ps->velocity, jumpMagnitude, pml.forward, pm->ps->velocity ); PM_AddEvent( EV_AIRPOUNCE ); @@ -1399,7 +1400,7 @@ Only with the flight powerup */ static void PM_FlyMove( void ) { - int i; + // int i; vec3_t wishvel,wishdir; float wishspeed,scale; diff --git a/src/game/bg_slidemove.c b/src/game/bg_slidemove.c index b0ab7f7..71d7b21 100644 --- a/src/game/bg_slidemove.c +++ b/src/game/bg_slidemove.c @@ -294,7 +294,7 @@ PM_StepSlideMove qboolean PM_StepSlideMove( qboolean gravity, qboolean predictive ) { vec3_t start_o, start_v; - vec3_t down_o, down_v; + // vec3_t down_o, down_v; trace_t trace; vec3_t normal; vec3_t step_v, step_vNormal; @@ -335,8 +335,8 @@ qboolean PM_StepSlideMove( qboolean gravity, qboolean predictive ) return stepped; } - VectorCopy( pm->ps->origin, down_o ); - VectorCopy( pm->ps->velocity, down_v ); + // VectorCopy( pm->ps->origin, down_o ); + // VectorCopy( pm->ps->velocity, down_v ); VectorCopy( start_o, up ); VectorMA( up, STEPSIZE, normal, up ); diff --git a/src/game/edge_version.h b/src/game/edge_version.h index d5e3ab5..6795229 100644 --- a/src/game/edge_version.h +++ b/src/game/edge_version.h @@ -1,3 +1,3 @@ #ifndef EDGE_MOD_VERSION -#define EDGE_MOD_VERSION "7.5e" +#define EDGE_MOD_VERSION "7.6i" #endif diff --git a/src/game/g_active.c b/src/game/g_active.c index d5dfd21..2fdb514 100644 --- a/src/game/g_active.c +++ b/src/game/g_active.c @@ -544,7 +544,7 @@ void SpectatorThink( gentity_t *ent, usercmd_t *ucmd ) pmove_t pm; gclient_t *client; int clientNum; - qboolean attack1, attack3, following, queued; + qboolean attack1, /*attack3,*/ following, queued; client = ent->client; @@ -553,8 +553,8 @@ void SpectatorThink( gentity_t *ent, usercmd_t *ucmd ) attack1 = ( client->buttons & BUTTON_ATTACK ) && !( client->oldbuttons & BUTTON_ATTACK ); - attack3 = ( client->buttons & BUTTON_USE_HOLDABLE ) && - !( client->oldbuttons & BUTTON_USE_HOLDABLE ); + /*attack3 = ( client->buttons & BUTTON_USE_HOLDABLE ) && + !( client->oldbuttons & BUTTON_USE_HOLDABLE );*/ // We are in following mode only if we are following a non-spectating client following = client->sess.spectatorState == SPECTATOR_FOLLOW; @@ -756,8 +756,8 @@ void ClientTimerActions( gentity_t *ent, int msec ) usercmd_t *ucmd; int aForward, aRight; qboolean walking = qfalse, stopped = qfalse, - crouched = qfalse, jumping = qfalse, - strafing = qfalse; + crouched = qfalse, jumping = qfalse; + // qboolean strafing = qfalse; int i; @@ -771,8 +771,8 @@ void ClientTimerActions( gentity_t *ent, int msec ) else if( aForward <= 64 && aRight <= 64 ) walking = qtrue; - if( aRight > 0 ) - strafing = qtrue; + // if( aRight > 0 ) + // strafing = qtrue; if( ucmd->upmove > 0 ) jumping = qtrue; @@ -2296,7 +2296,7 @@ while a slow client may have multiple ClientEndFrame between ClientThink. */ void ClientEndFrame( gentity_t *ent ) { - clientPersistant_t *pers; + // clientPersistant_t *pers; if( ent->client->sess.spectatorState != SPECTATOR_NOT ) { @@ -2304,7 +2304,7 @@ void ClientEndFrame( gentity_t *ent ) return; } - pers = &ent->client->pers; + // pers = &ent->client->pers; // // If the end of unit layout is displayed, don't give diff --git a/src/game/g_admin.c b/src/game/g_admin.c index 6beac1c..34e8b20 100644 --- a/src/game/g_admin.c +++ b/src/game/g_admin.c @@ -1651,7 +1651,7 @@ qboolean G_admin_register( gentity_t *ent ) newLevel = oldLevel; trap_SendConsoleCommand( EXEC_APPEND, - va( "setlevel %d %d;", ent - g_entities, newLevel ) ); + va( "setlevel %d %d;", (int)(ent - g_entities), newLevel ) ); AP( va( "print \"^3register: %s is now a %s nickname. Commands unlocked. ^2Congratulations!\n\"", ( newLevel == 0 && ent->client->pers.admin ) ? @@ -2845,7 +2845,7 @@ static void ban_out( void *ban, char *str ) Com_sprintf( str,MAX_STRING_CHARS, S_COLOR_CYAN "------------------------------" - S_COLOR_CYAN "\n id: | %ld" + S_COLOR_CYAN "\n id: | %d" S_COLOR_CYAN "\n Name: | %-*s" S_COLOR_CYAN "\n IP: | %s%-15s" S_COLOR_CYAN "\n Banner: | %s" diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c index 51946a0..bf353bf 100644 --- a/src/game/g_buildable.c +++ b/src/game/g_buildable.c @@ -1091,7 +1091,7 @@ Think function for Alien Overmind */ void AOvermind_Think( gentity_t *self ) { - vec3_t range = { OVERMIND_ATTACK_RANGE, OVERMIND_ATTACK_RANGE, OVERMIND_ATTACK_RANGE }; + // vec3_t range = { OVERMIND_ATTACK_RANGE, OVERMIND_ATTACK_RANGE, OVERMIND_ATTACK_RANGE }; int i; if( self->spawned && ( self->health > 0 ) ) @@ -1633,11 +1633,6 @@ void AHive_Pain( gentity_t *self, gentity_t *attacker, int damage ) G_SetBuildableAnim( self, BANIM_PAIN1, qfalse ); } -//================================================================================== - -/* - - /* ================ G_Push @@ -3800,7 +3795,7 @@ void G_FreeMarkedBuildables( gentity_t *deconner, char *readable, int rsize, removalCounts[ bNum ]++; if( nums ) - Q_strcat( nums, nsize, va( " %d", ent - g_entities ) ); + Q_strcat( nums, nsize, va( " %d", (int)(ent - g_entities) ) ); G_FreeEntity( ent ); } @@ -4147,7 +4142,7 @@ static void G_SetBuildableLinkState( qboolean link ) trap_UnlinkEntity( ent ); } } - +/* Commented out as all of it's use cases are commented out as well. static void G_SetBuildableMarkedLinkState( qboolean link ) { int i; @@ -4162,7 +4157,7 @@ static void G_SetBuildableMarkedLinkState( qboolean link ) trap_UnlinkEntity( ent ); } } - +*/ /* ================ G_CanBuild diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index 8595b60..eab8631 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -952,7 +952,7 @@ static qboolean G_SayTo( gentity_t *ent, gentity_t *other, saymode_t mode, const } trap_SendServerCommand( other-g_entities, va( "chat %d %d \"%s\"", - ent ? ent-g_entities : -1, + ent ? (int)(ent-g_entities) : -1, mode, message ) ); @@ -1187,12 +1187,12 @@ void Cmd_VSay_f( gentity_t *ent ) case VOICE_CHAN_LOCAL: trap_SendServerCommand( -1, va( "voice %d %d %d %d \"%s\"\n", - ent-g_entities, vchan, cmdNum, trackNum, text ) ); + (int)(ent-g_entities), vchan, cmdNum, trackNum, text ) ); break; case VOICE_CHAN_TEAM: G_TeamCommand( ent->client->pers.teamSelection, va( "voice %d %d %d %d \"%s\"\n", - ent-g_entities, vchan, cmdNum, trackNum, text ) ); + (int)(ent-g_entities), vchan, cmdNum, trackNum, text ) ); break; default: break; @@ -3826,7 +3826,7 @@ void Cmd_MyScore_f( gentity_t *ent ) return; } l = G_admin_find_level_for_score( ent->client->pers.admin->score ); - if ( n = G_admin_level_next( G_admin_level( l->level ) ) ) { + if (( n = G_admin_level_next( G_admin_level( l->level ) ) )) { ADMP( va( "^7Level %d (%s^7) total score earned: %d next level: %d\n", l->level, G_admin_level( l->level )->name, ent->client->pers.admin->score, n->score ) ); } else { diff --git a/src/game/g_combat.c b/src/game/g_combat.c index 65bd8d5..9a7c1d3 100644 --- a/src/game/g_combat.c +++ b/src/game/g_combat.c @@ -1138,12 +1138,12 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker, vec3_t dir, vec3_t point, int damage, int dflags, int mod ) { gclient_t *client; - int damage_orig = damage; + // int damage_orig = damage; int take; int asave = 0; int knockback; int poisonTime = 0; - int client_z, min_z; + // int client_z, min_z; // Can't deal damage sometimes if( !targ->takedamage || targ->health <= 0 || level.intermissionQueued ) return; @@ -1803,7 +1803,7 @@ Register a weapon shot */ void G_CombatStats_Fire( gentity_t *ent, combatStatsWeapon_t weapon, int damage ) { - combatStats_t *cs; + // combatStats_t *cs; if( !ent || !ent->client ) return; @@ -1812,7 +1812,7 @@ void G_CombatStats_Fire( gentity_t *ent, combatStatsWeapon_t weapon, int damage if( g_debugDamage.integer > 3 ) Com_Printf( "player %i fired %s, damage: %i\n", - ent - g_entities, + (int)(ent - g_entities), cswStrings[ weapon ], damage ); } @@ -1859,13 +1859,13 @@ void G_CombatStats_Hit( gentity_t *ent, gentity_t *hit, combatStatsWeapon_t weap if( g_debugDamage.integer > 3 ) Com_Printf( "player %i hit %s %i with %s, damage: %i\n", - ent - g_entities, + (int)(ent - g_entities), ( type == CSD_FRIENDLY_BUILDABLE ) ? "a friendly buildable" : ( type == CSD_ENEMY_BUILDABLE ) ? "an enemy buildable" : ( type == CSD_FRIENDLY ) ? "a friendly player" : ( type == CSD_ENEMY ) ? "an enemy player" : "themselves", - hit - g_entities, + (int)(hit - g_entities), cswStrings[ weapon ], damage ); diff --git a/src/game/g_local.h b/src/game/g_local.h index d2b5288..a46131a 100644 --- a/src/game/g_local.h +++ b/src/game/g_local.h @@ -870,11 +870,13 @@ gentity_t *G_CheckSpawnPoint( int spawnNum, const vec3_t origin, buildable_t G_IsPowered( vec3_t origin ); qboolean G_IsDCCBuilt( void ); +void G_Suicide( gentity_t *self, meansOfDeath_t death ); int G_FindDCC( gentity_t *self ); gentity_t *G_Reactor( void ); gentity_t *G_Overmind( void ); gentity_t *G_Cocoon( void ); qboolean G_FindCreep( gentity_t *self ); +qboolean G_IsCreepHere( vec3_t origin ); void G_BuildableThink( gentity_t *ent, int msec ); qboolean G_BuildableRange( vec3_t origin, float r, buildable_t buildable ); @@ -891,6 +893,8 @@ int G_LayoutList( const char *map, char *list, int len ); void G_LayoutSelect( void ); qboolean G_LayoutExists( char *mapName, char *layoutName ); void G_LayoutLoad( void ); +void G_LayoutForceBuildItem( buildable_t buildable, vec3_t origin, + vec3_t angles, vec3_t origin2, vec3_t angles2 ); void G_BaseSelfDestruct( team_t team ); int G_NextQueueTime( int queuedBP, int totalBP, int queueBaseRate ); void G_QueueBuildPoints( gentity_t *self ); @@ -1015,13 +1019,29 @@ gentity_t *fire_bounceBall2( gentity_t *self, vec3_t start, vec3_t dir, int weap gentity_t *fire_bounceBall3( gentity_t *self, vec3_t start, vec3_t dir, int weapon, int dmg, int mod, int speed, int radius ); gentity_t *fire_hive( gentity_t *self, vec3_t start, vec3_t dir ); gentity_t *launch_grenade( gentity_t *self, vec3_t start, vec3_t dir ); +gentity_t *launch_grenade_flames( gentity_t *self, vec3_t start, vec3_t dir ); +gentity_t *launch_shield( gentity_t *self, vec3_t start, vec3_t dir ); +gentity_t *launch_saw( gentity_t *self, vec3_t start, vec3_t dir ); +gentity_t *fire_md2( gentity_t *self, vec3_t start, vec3_t dir ); gentity_t *launch_mine( gentity_t *self, vec3_t start, vec3_t dir ); gentity_t *launch_flames( gentity_t *self, vec3_t start, vec3_t dir ); gentity_t *launch_smoke( gentity_t *self, vec3_t start, vec3_t dir ); +gentity_t *fire_rocket( gentity_t *self, vec3_t start, vec3_t dir ); gentity_t *fire_acidBomb( gentity_t *self, vec3_t start, vec3_t dir, int wp ); gentity_t *fire_acidBomb2( gentity_t *self, vec3_t start, vec3_t dir, int wp ); gentity_t *fire_fern( vec3_t origin, vec3_t angles, int lifespan ); +gentity_t *Prickles_Fire( gentity_t *self, vec3_t start, vec3_t dir ); + +gentity_t *NapalmChargeFire( gentity_t *self, vec3_t start, vec3_t dir, + int damage, int radius, int speed ); +gentity_t *NapalmChargeImp( gentity_t *self, vec3_t start, vec3_t dir, + int damage, int radius, int speed ); +gentity_t *FlamerNormalFire( gentity_t *self, vec3_t start, vec3_t dir ); +gentity_t *FireBreath_fire( gentity_t *self, vec3_t start, vec3_t dir, + int damage, int radius, int speed ); +gentity_t *FlameTurretFireNormal( gentity_t *self, vec3_t start, vec3_t dir ); + // // g_mover.c // @@ -1129,6 +1149,7 @@ void G_CheckVote( team_t team ); void G_ArmageddonStep( void ); void LogExit( const char *string ); int G_TimeTilSuddenDeath( void ); +int G_TimeTilWeakSuddenDeath( void ); int G_HumanBuildPoints( void ); int G_AlienBuildPoints( void ); // @@ -1151,6 +1172,7 @@ void G_UnlaggedOff( void ); void ClientThink( int clientNum ); void ClientEndFrame( gentity_t *ent ); void G_RunClient( gentity_t *ent ); +void G_ArmaFreeLove( gentity_t *ent ); // // g_team.c diff --git a/src/game/g_main.c b/src/game/g_main.c index 28dfb33..1249905 100644 --- a/src/game/g_main.c +++ b/src/game/g_main.c @@ -669,11 +669,11 @@ void G_InitGame( int levelTime, int randomSeed, int restart ) { char serverinfo[ MAX_INFO_STRING ]; qtime_t qt; - int t; + // int t; trap_GetServerinfo( serverinfo, sizeof( serverinfo ) ); G_LogPrintf( "------------------------------------------------------------\n" ); G_LogPrintf( "InitGame: %s\n", serverinfo ); - t = trap_RealTime( &qt ); + /*t = */trap_RealTime( &qt ); G_LogPrintf("RealTime: %04i-%02i-%02i %02i:%02i:%02i\n", qt.tm_year+1900, qt.tm_mon+1, qt.tm_mday, qt.tm_hour, qt.tm_min, qt.tm_sec ); @@ -2015,8 +2015,8 @@ void G_AdminMessage( gentity_t *ent, const char *msg ) int i; Com_sprintf( string, sizeof( string ), "chat %d %d \"%s\"", - ent ? ent - g_entities : -1, - G_admin_permission( ent, ADMF_ADMINCHAT ) ? SAY_ADMINS : SAY_ADMINS_PUBLIC, + (ent ? (int)(ent - g_entities) : -1), + (G_admin_permission( ent, ADMF_ADMINCHAT ) ? SAY_ADMINS : SAY_ADMINS_PUBLIC), msg ); // Send to all appropriate clients @@ -2671,9 +2671,9 @@ void G_ArmageddonStep( void ) } break; } -} - G_ArmaFreeLove(); - trap_SendServerCommand( -1, va( "cp \"^5A flying hotdog does its weener magic and converts buildings into pure joy! [yeshdog]\"" ) ); + } + G_ArmaFreeLove(ent); + trap_SendServerCommand( -1, va( "cp \"^5A flying hotdog does its weener magic and converts buildings into pure joy! [yeshdog]\"" ) ); } /* ================== diff --git a/src/game/g_missile.c b/src/game/g_missile.c index 8c6e36d..63f5e97 100644 --- a/src/game/g_missile.c +++ b/src/game/g_missile.c @@ -482,18 +482,17 @@ G_ProcessSmoke ================ */ void G_ProcessSmoke(gentity_t *ent) { - int i, total_entities, entityList[MAX_GENTITIES]; - vec3_t range, mins, maxs; - gentity_t *target; - - if (level.time > ent->s.time + 30000) + // int i, total_entities, entityList[MAX_GENTITIES]; + // vec3_t range, mins, maxs; + // gentity_t *target; + if (level.time > ent->s.time + 30000) { - ent->nextthink = level.time + 100; - ent->think = G_ExplodeMissile; - return; + ent->nextthink = level.time + 100; + ent->think = G_ExplodeMissile; + return; } - // Set the next time to run this check (can be overwritten below) - ent->nextthink = level.time + SMOKE_CHECK_FREQUENCY; + // Set the next time to run this check (can be overwritten below) + ent->nextthink = level.time + SMOKE_CHECK_FREQUENCY; } /* @@ -644,7 +643,7 @@ gentity_t *NapalmChargeFire( gentity_t *self, vec3_t start, vec3_t dir, bolt->splashMethodOfDeath = MOD_FLAMER_SPLASH; bolt->clipmask = MASK_SHOT; bolt->target_ent = NULL; - bolt->r.mins[ 0 ] = bolt->r.mins[ 2 ] = bolt->r.mins[ 3 ] = -LCANNON_SIZE; + bolt->r.mins[ 0 ] = bolt->r.mins[ 1 ] = bolt->r.mins[ 2 ] = -LCANNON_SIZE; bolt->r.maxs[ 0 ] = bolt->r.maxs[ 1 ] = bolt->r.maxs[ 2 ] = -bolt->r.mins[ 0 ]; // Pass the missile charge through charge = (float)( damage - LCANNON_SECONDARY_DAMAGE ) / LCANNON_DAMAGE; @@ -1061,7 +1060,7 @@ void G_LasgunPush( gentity_t *self ) vec3_t mins, maxs; int i, num; gentity_t *enemy; - vec3_t start,dir,end; + vec3_t /*start,*/dir/*,end*/; float force; qboolean active = qfalse; @@ -1164,7 +1163,7 @@ void G_LasgunPush( gentity_t *self ) gentity_t *launch_shield( gentity_t *self, vec3_t start, vec3_t dir ) { - vec3_t range = { LASGUN_PUSH_RANGE, LASGUN_PUSH_RANGE, LASGUN_PUSH_RANGE }; + // vec3_t range = { LASGUN_PUSH_RANGE, LASGUN_PUSH_RANGE, LASGUN_PUSH_RANGE }; gentity_t *bolt; VectorNormalize( dir ); bolt = G_Spawn( ); diff --git a/src/game/g_session.c b/src/game/g_session.c index 847013a..600257c 100644 --- a/src/game/g_session.c +++ b/src/game/g_session.c @@ -55,11 +55,11 @@ void G_WriteClientSessionData( gclient_t *client ) client->sess.spectatorState, client->sess.spectatorClient, client->sess.restartTeam, - client->sess.seenWelcome, + client->sess.seenWelcome, Com_ClientListString( &client->sess.ignoreList ) - ); + ); - var = va( "session%i", client - level.clients ); + var = va( "session%i", (int)(client - level.clients) ); trap_Cvar_Set( var, s ); } @@ -79,7 +79,7 @@ void G_ReadSessionData( gclient_t *client ) int restartTeam; char ignorelist[ 17 ]; - var = va( "session%i", client - level.clients ); + var = va( "session%i", (int)(client - level.clients) ); trap_Cvar_VariableStringBuffer( var, s, sizeof(s) ); sscanf( s, "%i %i %i %i %i %16s", diff --git a/src/game/g_team.c b/src/game/g_team.c index fd62600..ce83c11 100644 --- a/src/game/g_team.c +++ b/src/game/g_team.c @@ -282,7 +282,7 @@ void G_ChangeTeam( gentity_t *ent, team_t newTeam ) /* Call this method to balance teams */ -void G_BalanceTeams() +void G_BalanceTeams( void ) { team_t sourceTeam; gentity_t *ent; diff --git a/src/game/g_weapon.c b/src/game/g_weapon.c index 5779aec..58432d7 100644 --- a/src/game/g_weapon.c +++ b/src/game/g_weapon.c @@ -584,10 +584,7 @@ PULSE RIFLE STASIS void prifleStasisFire( gentity_t *ent ) { - gentity_t *m; - fire_prifle_stasis( ent, muzzle, forward ); - } @@ -681,9 +678,7 @@ MINE void throwMine( gentity_t *ent ) { - gentity_t *m; - - m = launch_mine( ent, muzzle, forward ); + launch_mine( ent, muzzle, forward ); } /* @@ -693,14 +688,12 @@ ACID BOMBS */ void acidBombFire( gentity_t *ent, int wp ) { - gentity_t *m; - m = fire_acidBomb( ent, muzzle, forward, wp ); + fire_acidBomb( ent, muzzle, forward, wp ); } void acidBombFire2x( gentity_t *ent, int wp ) { - gentity_t *m; - m = fire_acidBomb2( ent, muzzle, forward, wp ); + fire_acidBomb2( ent, muzzle, forward, wp ); } /* @@ -862,7 +855,7 @@ LIGHTNING GUN float G_LightningAccuracy( const vec3_t ws_origin, const vec3_t ws_dir, const vec3_t mins, const vec3_t maxs, const vec3_t ws_target ) { - int i, damage; + int i/*, damage*/; vec3_t origin, dir, boxcenter, boxdelta; float dist, chord; @@ -898,7 +891,7 @@ float G_LightningAccuracy( const vec3_t ws_origin, const vec3_t ws_dir, void lightningGunFire( gentity_t *ent ) { - vec3_t start, end, mins, maxs, target_origin; + vec3_t /*start, */end, mins, maxs, target_origin; trace_t tr; gentity_t *target; int damage; @@ -1046,12 +1039,6 @@ cancelBuildFire */ void cancelBuildFire( gentity_t *ent ) { - - trace_t tr; - gentity_t *traceEnt; - vec3_t forward, end; - int bHealth; - // Cancel ghost buildable if( ent->client->ps.stats[ STAT_BUILDABLE ] != BA_NONE ) { @@ -1716,13 +1703,10 @@ void bounceBallFire( gentity_t *ent ) void bounceBallFire_level2( gentity_t *ent ) { - gentity_t *m; - - m = fire_bounceBall2( ent, muzzle, forward, - WP_ALEVEL2_UPG, LEVEL2_BOUNCEBALL_DMG, - MOD_LEVEL2_BOUNCEBALL, LEVEL2_BOUNCEBALL_SPEED, - LEVEL2_BOUNCEBALL_RADIUS ); - + fire_bounceBall2( ent, muzzle, forward, + WP_ALEVEL2_UPG, LEVEL2_BOUNCEBALL_DMG, + MOD_LEVEL2_BOUNCEBALL, LEVEL2_BOUNCEBALL_SPEED, + LEVEL2_BOUNCEBALL_RADIUS ); } /* @@ -1853,12 +1837,10 @@ LEVEL5 void Prickles( gentity_t *ent ) { - trace_t tr; vec3_t end; float r; float u; - G_CombatStats_Fire( ent, CSW_LEVEL5_ALT, LEVEL5_PRICKLES_DMG ); r = random( ) * M_PI * 2.0f; @@ -1881,8 +1863,6 @@ FireWeapon3 */ void FireWeapon3( gentity_t *ent ) { -playerState_t *ps = &ent->client->ps; -gclient_t *client; if( ent->client ) { // set aiming directions |