Skip to content
Permalink
Browse files

Merge CL_FlushMemory into CL_ShutdownAll

  • Loading branch information...
slipher committed Jul 5, 2019
1 parent 403d079 commit e2024d323e18c1df888359de67a9b28097b124d6
@@ -89,7 +89,8 @@ class ClientApplication : public Application {
FS_LoadBasePak();
SV_Shutdown(Str::Format("Server crashed: %s\n", reason).c_str());
CL_Disconnect(true);
CL_FlushMemory();
CL_ShutdownAll();
CL_StartHunkUsers();
}

void Shutdown(bool error, Str::StringRef message) override {
@@ -112,7 +112,8 @@ static void CL_DownloadsComplete()

// flush client memory and start loading stuff
// this will also (re)load the UI
CL_FlushMemory();
CL_ShutdownAll();
CL_StartHunkUsers();

// initialize the CGame
cls.cgameStarted = true;
@@ -611,8 +611,6 @@ class DemoPlayCmd: public Cmd::StaticCmd {
Cvar_Set( "sv_killserver", "1" );
CL_Disconnect( true );

// CL_FlushMemory(); //----(SA) MEM NOTE: in missionpack, this is moved to CL_DownloadsComplete

// open the demo file
const std::string& fileName = args.Argv(1);

@@ -730,20 +728,6 @@ void CL_ShutdownAll()
StopVideo();
// Gordon: stop recording on map change etc, demos aren't valid over map changes anyway
CL_StopRecord();
}

/*
=================
CL_FlushMemory
Called by CL_DownloadsComplete (the only way a client gets into a game)
Also called on a DropError
=================
*/
void CL_FlushMemory()
{
// shutdown all the client stuff
CL_ShutdownAll();

if ( !com_sv_running->integer )
{
@@ -755,8 +739,6 @@ void CL_FlushMemory()
}

Hunk_Clear();

CL_StartHunkUsers();
}

/*
@@ -484,7 +484,6 @@ extern cvar_t *cl_mumbleScale;
//

void CL_Init();
void CL_FlushMemory();
void CL_ShutdownAll();
void CL_AddReliableCommand( const char *cmd );

@@ -78,10 +78,6 @@ void CL_JoystickEvent( int, int )
{
}

void CL_FlushMemory()
{
}

void CL_ShutdownAll()
{
}
@@ -705,10 +705,6 @@ void CL_ShutdownAll();

// shutdown all the client stuff

void CL_FlushMemory();

// dump all memory on an error

// AVI files have the start of pixel lines 4 byte-aligned
#define AVI_LINE_PADDING 4

0 comments on commit e2024d3

Please sign in to comment.
You can’t perform that action at this time.