Skip to content

Commit

Permalink
game SAVEGAME_SUPPORT code removal refs #28
Browse files Browse the repository at this point in the history
  • Loading branch information
IR4T4 committed May 9, 2012
1 parent a054a21 commit e971b93
Show file tree
Hide file tree
Showing 9 changed files with 2 additions and 137 deletions.
7 changes: 0 additions & 7 deletions src/game/bg_pmove.c
Expand Up @@ -4535,13 +4535,6 @@ static void PM_Weapon(void)
return;
}

#ifdef SAVEGAME_SUPPORT
if (pm->reloading)
{
return;
}
#endif // SAVEGAME_SUPPORT

// player is zooming - no fire
// JPW NERVE in MP, LT needs to zoom to call artillery
if (pm->ps->eFlags & EF_ZOOMING)
Expand Down
6 changes: 0 additions & 6 deletions src/game/bg_public.h
Expand Up @@ -49,8 +49,6 @@
#define _attribute(x)
#endif

//#define SAVEGAME_SUPPORT // uncomment to enable savegames
// enabling this requires you to run extractfuncs.bat as well before compiling qagame

#define SPRINTTIME 20000.0f

Expand Down Expand Up @@ -566,10 +564,6 @@ typedef struct

int *skill; // player skills

#ifdef SAVEGAME_SUPPORT
qboolean reloading;
#endif // SAVEGAME_SUPPORT

#ifdef GAMEDLL // the whole stamina thing is only in qagame
qboolean leadership; // within 512 units of a player with level 5 Signals skill (that player has to be in PVS as well to make sue we can predict it)
#endif // GAMEDLL
Expand Down
14 changes: 0 additions & 14 deletions src/game/g_active.c
Expand Up @@ -585,13 +585,6 @@ void SpectatorThink(gentity_t *ent, usercmd_t *ucmd)
pm.trace = trap_TraceCapsuleNoEnts;
pm.pointcontents = trap_PointContents;

#ifdef SAVEGAME_SUPPORT
if (g_gametype.integer == GT_SINGLE_PLAYER && g_reloading.integer)
{
pm.reloading = qtrue;
}
#endif // SAVEGAME_SUPPORT

Pmove(&pm); // JPW NERVE

// Rafael - Activate
Expand Down Expand Up @@ -1305,13 +1298,6 @@ void ClientThink_real(gentity_t *ent)
break;
}*/

#ifdef SAVEGAME_SUPPORT
if (g_gametype.integer == GT_SINGLE_PLAYER && g_reloading.integer)
{
pm.reloading = qtrue;
}
#endif // SAVEGAME_SUPPORT

// Gordon: bit hacky, stop the slight lag from client -> server even on locahost, switching back to the weapon you were holding
// and then back to what weapon you should have, became VERY noticible for the kar98/carbine + gpg40, esp now i've added the
// animation locking
Expand Down
21 changes: 0 additions & 21 deletions src/game/g_cmds.c
Expand Up @@ -832,13 +832,6 @@ void Cmd_Kill_f(gentity_t *ent)
return;
}

#ifdef SAVEGAME_SUPPORT
if (g_gametype.integer == GT_SINGLE_PLAYER && g_reloading.integer)
{
return;
}
#endif // SAVEGAME_SUPPORT

ent->flags &= ~FL_GODMODE;
ent->client->ps.stats[STAT_HEALTH] = ent->health = 0;
ent->client->ps.persistant[PERS_HWEAPON_USE] = 0; // TTimo - if using /kill while at MG42
Expand Down Expand Up @@ -2859,20 +2852,6 @@ void Cmd_StopCamera_f(gentity_t *ent)

//G_SetOrigin( ent, ent->client->cameraOrigin ); // restore our origin
//VectorCopy( ent->client->cameraOrigin, ent->client->ps.origin );

// (SA) trying this in client to avoid 1 frame of player drawing
// ent->s.eFlags &= ~EF_NODRAW;
// ent->client->ps.eFlags &= ~EF_NODRAW;

// RF, if we are near the spawn point, save the "current" game, for reloading after death
// sp = NULL;
// gcc: suggests () around assignment used as truth value
// while ((sp = G_Find( sp, FOFS(classname), "info_player_deathmatch" ))) { // info_player_start becomes info_player_deathmatch in it's spawn functon
// if (Distance( ent->s.pos.trBase, sp->s.origin ) < 256 && trap_InPVS( ent->s.pos.trBase, sp->s.origin )) {
// G_SaveGame( NULL );
// break;
// }
// }
}
}

Expand Down
14 changes: 0 additions & 14 deletions src/game/g_local.h
Expand Up @@ -1545,16 +1545,6 @@ qboolean Do_Activate_f(gentity_t *ent, gentity_t *traceEnt);
void G_LeaveTank(gentity_t *ent, qboolean position);


// Ridah

// g_save.c
#ifdef SAVEGAME_SUPPORT
qboolean G_SaveGame(char *username);
void G_LoadGame(void);
qboolean G_SavePersistant(char *nextmap);
void G_LoadPersistant(void);
#endif // SAVEGAME_SUPPORT

// g_script.c
void G_Script_ScriptParse(gentity_t *ent);
qboolean G_Script_ScriptRun(gentity_t *ent);
Expand Down Expand Up @@ -1681,10 +1671,6 @@ extern vmCvar_t g_lms_currentMatch;
extern vmCvar_t g_lms_lockTeams;
extern vmCvar_t g_lms_followTeamOnly;

#ifdef SAVEGAME_SUPPORT
extern vmCvar_t g_reloading;
#endif // SAVEGAME_SUPPORT

// NERVE - SMF
extern vmCvar_t g_warmupLatch;
extern vmCvar_t g_nextTimeLimit;
Expand Down
28 changes: 0 additions & 28 deletions src/game/g_main.c
Expand Up @@ -214,10 +214,6 @@ vmCvar_t g_lms_currentMatch;
vmCvar_t g_lms_lockTeams;
vmCvar_t g_lms_followTeamOnly;

#ifdef SAVEGAME_SUPPORT
vmCvar_t g_reloading;
#endif // SAVEGAME_SUPPORT

vmCvar_t mod_url;
vmCvar_t url;

Expand Down Expand Up @@ -429,11 +425,6 @@ cvarTable_t gameCvarTable[] =
{ &g_currentCampaign, "g_currentCampaign", "", CVAR_WOLFINFO | CVAR_ROM, 0, },
{ &g_currentCampaignMap, "g_currentCampaignMap", "0", CVAR_WOLFINFO | CVAR_ROM, 0, },


#ifdef SAVEGAME_SUPPORT
{ &g_reloading, "g_reloading", "0", CVAR_ROM },
#endif // SAVEGAME_SUPPORT
// points to the URL for mod information, should not be modified by server admin
{ &mod_url, "mod_url", "", CVAR_SERVERINFO | CVAR_ROM, 0, qfalse},
// configured by the server admin, points to the web pages for the server
Expand Down Expand Up @@ -723,16 +714,6 @@ void G_CheckForCursorHints(gentity_t *ent)

ps = &ent->client->ps;

#ifdef SAVEGAME_SUPPORT
// don't change anything if reloading. just set the exit hint
if ((g_gametype.integer == GT_SINGLE_PLAYER || g_gametype.integer == GT_COOP) && g_reloading.integer == RELOAD_NEXTMAP_WAITING)
{
ps->serverCursorHint = HINT_EXIT;
ps->serverCursorHintVal = 0;
return;
}
#endif // SAVEGAME_SUPPORT

indirectHit = qfalse;

zooming = (qboolean)(ps->eFlags & EF_ZOOMING);
Expand Down Expand Up @@ -4261,10 +4242,6 @@ uebrgpiebrpgibqeripgubeqrpigubqifejbgipegbrtibgurepqgbn%i", level.time)
}
#endif

#ifdef SAVEGAME_SUPPORT
G_CheckLoadGame();
#endif // SAVEGAME_SUPPORT

// get any cvar changes
G_UpdateCvars();

Expand Down Expand Up @@ -4307,11 +4284,6 @@ uebrgpiebrpgibqeripgubeqrpigubqifejbgipegbrtibgurepqgbn%i", level.time)
level.gameManager->s.otherEntityNum = MAX_TEAM_LANDMINES - G_CountTeamLandmines(TEAM_AXIS);
level.gameManager->s.otherEntityNum2 = MAX_TEAM_LANDMINES - G_CountTeamLandmines(TEAM_ALLIES);
}

#ifdef SAVEGAME_SUPPORT
// Check if we are reloading, and times have expired
G_CheckReloadStatus();
#endif // SAVEGAME_SUPPORT
}

// Is this a single player type game - sp or coop?
Expand Down
34 changes: 0 additions & 34 deletions src/game/g_save.c

This file was deleted.

2 changes: 1 addition & 1 deletion src/game/g_spawn.c
Expand Up @@ -526,7 +526,7 @@ spawn_t spawns[] =
{ "target_lock", SP_target_lock },
{ "target_effect", SP_target_effect },
{ "target_fog", SP_target_fog },
{ "target_autosave", SP_target_autosave }, //----(SA) added
{ "target_autosave", SP_target_autosave }, // obsolete
//---- done

{ "target_rumble", SP_target_rumble },
Expand Down
13 changes: 1 addition & 12 deletions src/game/g_target.c
Expand Up @@ -877,16 +877,6 @@ void SP_target_location(gentity_t *self)

//---- (SA) Wolf targets

/*
==============
Use_Target_Autosave
save game for emergency backup or convienience
==============
*/
/*void Use_Target_Autosave( gentity_t *ent, gentity_t *other, gentity_t *activator ) {
G_SaveGame("autosave.sav");
}*/

/*
==============
Use_Target_Counter
Expand Down Expand Up @@ -995,8 +985,7 @@ saves game to 'autosave.sav' when triggered then dies.
*/
void SP_target_autosave(gentity_t *ent)
{
// ent->use = Use_Target_Autosave;
G_FreeEntity(ent);
G_Printf("SP_target_autosave not supported.\n");
}

//==========================================================
Expand Down

0 comments on commit e971b93

Please sign in to comment.