mirror of
https://bitbucket.org/CPMADevs/cnq3
synced 2024-11-10 06:31:48 +00:00
updating the FS on client disconnects
This commit is contained in:
parent
afe84395c5
commit
c512071f2d
4 changed files with 12 additions and 7 deletions
|
@ -21,6 +21,8 @@ chg: on Windows, a fatal error will move the early console window to the foregro
|
||||||
chg: com_hunkMegs doesn't have a maximum value anymore
|
chg: com_hunkMegs doesn't have a maximum value anymore
|
||||||
a value too high would reset it and the engine might fail to load with the default value
|
a value too high would reset it and the engine might fail to load with the default value
|
||||||
|
|
||||||
|
fix: now updating the FS (connected to pure server, pak references) on client disconnects
|
||||||
|
|
||||||
fix: the condump command was truncating its file path argument to 64 characters
|
fix: the condump command was truncating its file path argument to 64 characters
|
||||||
|
|
||||||
fix: "timedemo" playback runs at full speed again
|
fix: "timedemo" playback runs at full speed again
|
||||||
|
|
|
@ -783,6 +783,12 @@ void CL_Disconnect( qbool showMainMenu ) {
|
||||||
// not connected to a pure server anymore
|
// not connected to a pure server anymore
|
||||||
cl_connectedToPureServer = qfalse;
|
cl_connectedToPureServer = qfalse;
|
||||||
|
|
||||||
|
// let the FS know we're not connected to a pure server
|
||||||
|
// and clear all pak references except to the game QVM
|
||||||
|
FS_PureServerSetLoadedPaks( "" );
|
||||||
|
FS_PureServerSetReferencedPaks( "", "" );
|
||||||
|
FS_ClearPakReferences( FS_CGAME_REF | FS_UI_REF | FS_GENERAL_REF );
|
||||||
|
|
||||||
// Stop recording any video
|
// Stop recording any video
|
||||||
if( CL_VideoRecording( ) ) {
|
if( CL_VideoRecording( ) ) {
|
||||||
CL_CloseAVI( );
|
CL_CloseAVI( );
|
||||||
|
|
|
@ -2892,9 +2892,6 @@ FS_ClearPakReferences
|
||||||
void FS_ClearPakReferences( int flags ) {
|
void FS_ClearPakReferences( int flags ) {
|
||||||
searchpath_t *search;
|
searchpath_t *search;
|
||||||
|
|
||||||
if ( !flags ) {
|
|
||||||
flags = -1;
|
|
||||||
}
|
|
||||||
for ( search = fs_searchpaths; search; search = search->next ) {
|
for ( search = fs_searchpaths; search; search = search->next ) {
|
||||||
// is the element a pak file and has it been referenced?
|
// is the element a pak file and has it been referenced?
|
||||||
if ( search->pack ) {
|
if ( search->pack ) {
|
||||||
|
@ -3039,8 +3036,8 @@ void FS_Restart( int checksumFeed ) {
|
||||||
// set the checksum feed
|
// set the checksum feed
|
||||||
fs_checksumFeed = checksumFeed;
|
fs_checksumFeed = checksumFeed;
|
||||||
|
|
||||||
// clear pak references
|
// clear all pak references
|
||||||
FS_ClearPakReferences(0);
|
FS_ClearPakReferences(-1);
|
||||||
|
|
||||||
// try to start up normally
|
// try to start up normally
|
||||||
FS_Startup( BASEGAME );
|
FS_Startup( BASEGAME );
|
||||||
|
|
|
@ -355,8 +355,8 @@ void SV_SpawnServer( const char* mapname )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// clear pak references
|
// clear all pak references
|
||||||
FS_ClearPakReferences(0);
|
FS_ClearPakReferences(-1);
|
||||||
|
|
||||||
// allocate the snapshot entities on the hunk
|
// allocate the snapshot entities on the hunk
|
||||||
svs.snapshotEntities = (entityState_t*)Hunk_Alloc( sizeof(entityState_t)*svs.numSnapshotEntities, h_high );
|
svs.snapshotEntities = (entityState_t*)Hunk_Alloc( sizeof(entityState_t)*svs.numSnapshotEntities, h_high );
|
||||||
|
|
Loading…
Reference in a new issue