MCPcopy Create free account
hub / github.com/JACoders/OpenJK / CL_FlushMemory

Function CL_FlushMemory

code/client/cl_main.cpp:142–163  ·  view source on GitHub ↗

================= CL_FlushMemory Called by CL_MapLoading, CL_Connect_f, and CL_ParseGamestate the only ways a client gets into a game Also called by Com_Error ================= */

Source from the content-addressed store, hash-verified

140=================
141*/
142void CL_FlushMemory( void ) {
143
144 // clear sounds (moved higher up within this func to avoid the odd sound stutter)
145 S_DisableSounds();
146
147 // unload the old VM
148 CL_ShutdownCGame();
149
150 CL_ShutdownUI();
151
152 if ( re.Shutdown ) {
153 re.Shutdown( qfalse, qfalse ); // don't destroy window or context
154 }
155
156 //rwwFIXMEFIXME: The game server appears to continue running, so clearing common bsp data causes crashing and other bad things
157 /*
158 CM_ClearMap();
159 */
160
161 cls.soundRegistered = qfalse;
162 cls.rendererStarted = qfalse;
163}
164
165/*
166=====================

Callers 2

CL_MapLoadingFunction · 0.70
Com_CatchErrorFunction · 0.50

Calls 3

S_DisableSoundsFunction · 0.70
CL_ShutdownCGameFunction · 0.70
CL_ShutdownUIFunction · 0.70

Tested by

no test coverage detected