make fitz run more stable

This commit is contained in:
Daniel Gibson 2021-02-22 06:03:07 +01:00
parent 38cf2bc595
commit a79217c471
2 changed files with 24 additions and 14 deletions

View file

@ -204,11 +204,14 @@ void idMultiplayerGame::Reset() {
mapList = uiManager->AllocListGUI( );
mapList->Config( mainGui, "mapList" );
// set this GUI so that our Draw function is still called when it becomes the active/fullscreen GUI
if(mainGui) { // DG: in fitz this is NULL
mainGui->SetStateBool( "gameDraw", true );
mainGui->SetKeyBindingNames();
mainGui->SetStateInt( "com_machineSpec", cvarSystem->GetCVarInteger( "com_machineSpec" ) );
SetMenuSkin();
}
msgmodeGui = uiManager->FindGui( "guis/mpmsgmode.gui", true, false, true );
if(msgmodeGui) // DG: in fitz this is NULL
msgmodeGui->SetStateBool( "gameDraw", true );
ClearGuis();
ClearChatData();
@ -304,6 +307,7 @@ void idMultiplayerGame::ClearGuis() {
int i;
for ( i = 0; i < MAX_CLIENTS; i++ ) {
if(scoreBoard) { // DG: in fitz, this is NULL
scoreBoard->SetStateString( va( "player%i",i+1 ), "" );
scoreBoard->SetStateString( va( "player%i_score", i+1 ), "" );
scoreBoard->SetStateString( va( "player%i_tdm_tscore", i+1 ), "" );
@ -312,6 +316,7 @@ void idMultiplayerGame::ClearGuis() {
scoreBoard->SetStateString( va( "player%i_status", i+1 ), "" );
scoreBoard->SetStateInt( va( "rank%i", i+1 ), 0 );
scoreBoard->SetStateInt( "rank_self", 0 );
}
idPlayer *player = static_cast<idPlayer *>( gameLocal.entities[ i ] );
if ( !player || !player->hud ) {
@ -320,6 +325,7 @@ void idMultiplayerGame::ClearGuis() {
player->hud->SetStateString( va( "player%i",i+1 ), "" );
player->hud->SetStateString( va( "player%i_score", i+1 ), "" );
player->hud->SetStateString( va( "player%i_ready", i+1 ), "" );
if(scoreBoard)
scoreBoard->SetStateInt( va( "rank%i", i+1 ), 0 );
player->hud->SetStateInt( "rank_self", 0 );

View file

@ -4397,6 +4397,8 @@ idPlayer::NextWeapon
*/
void idPlayer::NextWeapon( void ) {
return; // DG: don't run into endless loop when using mousewheel due to lack of weapons
const char *weap;
int w;
@ -4453,6 +4455,8 @@ idPlayer::PrevWeapon
*/
void idPlayer::PrevWeapon( void ) {
return; // DG: don't run into endless loop when using mousewheel due to lack of weapons
const char *weap;
int w;