mirror of
https://github.com/dhewm/dhewm3-sdk.git
synced 2025-02-16 17:11:24 +00:00
make fitz run more stable
This commit is contained in:
parent
38cf2bc595
commit
a79217c471
2 changed files with 24 additions and 14 deletions
|
@ -204,12 +204,15 @@ void idMultiplayerGame::Reset() {
|
||||||
mapList = uiManager->AllocListGUI( );
|
mapList = uiManager->AllocListGUI( );
|
||||||
mapList->Config( mainGui, "mapList" );
|
mapList->Config( mainGui, "mapList" );
|
||||||
// set this GUI so that our Draw function is still called when it becomes the active/fullscreen GUI
|
// set this GUI so that our Draw function is still called when it becomes the active/fullscreen GUI
|
||||||
mainGui->SetStateBool( "gameDraw", true );
|
if(mainGui) { // DG: in fitz this is NULL
|
||||||
mainGui->SetKeyBindingNames();
|
mainGui->SetStateBool( "gameDraw", true );
|
||||||
mainGui->SetStateInt( "com_machineSpec", cvarSystem->GetCVarInteger( "com_machineSpec" ) );
|
mainGui->SetKeyBindingNames();
|
||||||
SetMenuSkin();
|
mainGui->SetStateInt( "com_machineSpec", cvarSystem->GetCVarInteger( "com_machineSpec" ) );
|
||||||
|
SetMenuSkin();
|
||||||
|
}
|
||||||
msgmodeGui = uiManager->FindGui( "guis/mpmsgmode.gui", true, false, true );
|
msgmodeGui = uiManager->FindGui( "guis/mpmsgmode.gui", true, false, true );
|
||||||
msgmodeGui->SetStateBool( "gameDraw", true );
|
if(msgmodeGui) // DG: in fitz this is NULL
|
||||||
|
msgmodeGui->SetStateBool( "gameDraw", true );
|
||||||
ClearGuis();
|
ClearGuis();
|
||||||
ClearChatData();
|
ClearChatData();
|
||||||
warmupEndTime = 0;
|
warmupEndTime = 0;
|
||||||
|
@ -304,14 +307,16 @@ void idMultiplayerGame::ClearGuis() {
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for ( i = 0; i < MAX_CLIENTS; i++ ) {
|
for ( i = 0; i < MAX_CLIENTS; i++ ) {
|
||||||
scoreBoard->SetStateString( va( "player%i",i+1 ), "" );
|
if(scoreBoard) { // DG: in fitz, this is NULL
|
||||||
scoreBoard->SetStateString( va( "player%i_score", i+1 ), "" );
|
scoreBoard->SetStateString( va( "player%i",i+1 ), "" );
|
||||||
scoreBoard->SetStateString( va( "player%i_tdm_tscore", i+1 ), "" );
|
scoreBoard->SetStateString( va( "player%i_score", i+1 ), "" );
|
||||||
scoreBoard->SetStateString( va( "player%i_tdm_score", i+1 ), "" );
|
scoreBoard->SetStateString( va( "player%i_tdm_tscore", i+1 ), "" );
|
||||||
scoreBoard->SetStateString( va( "player%i_wins", i+1 ), "" );
|
scoreBoard->SetStateString( va( "player%i_tdm_score", i+1 ), "" );
|
||||||
scoreBoard->SetStateString( va( "player%i_status", i+1 ), "" );
|
scoreBoard->SetStateString( va( "player%i_wins", i+1 ), "" );
|
||||||
scoreBoard->SetStateInt( va( "rank%i", i+1 ), 0 );
|
scoreBoard->SetStateString( va( "player%i_status", i+1 ), "" );
|
||||||
scoreBoard->SetStateInt( "rank_self", 0 );
|
scoreBoard->SetStateInt( va( "rank%i", i+1 ), 0 );
|
||||||
|
scoreBoard->SetStateInt( "rank_self", 0 );
|
||||||
|
}
|
||||||
|
|
||||||
idPlayer *player = static_cast<idPlayer *>( gameLocal.entities[ i ] );
|
idPlayer *player = static_cast<idPlayer *>( gameLocal.entities[ i ] );
|
||||||
if ( !player || !player->hud ) {
|
if ( !player || !player->hud ) {
|
||||||
|
@ -320,7 +325,8 @@ void idMultiplayerGame::ClearGuis() {
|
||||||
player->hud->SetStateString( va( "player%i",i+1 ), "" );
|
player->hud->SetStateString( va( "player%i",i+1 ), "" );
|
||||||
player->hud->SetStateString( va( "player%i_score", i+1 ), "" );
|
player->hud->SetStateString( va( "player%i_score", i+1 ), "" );
|
||||||
player->hud->SetStateString( va( "player%i_ready", i+1 ), "" );
|
player->hud->SetStateString( va( "player%i_ready", i+1 ), "" );
|
||||||
scoreBoard->SetStateInt( va( "rank%i", i+1 ), 0 );
|
if(scoreBoard)
|
||||||
|
scoreBoard->SetStateInt( va( "rank%i", i+1 ), 0 );
|
||||||
player->hud->SetStateInt( "rank_self", 0 );
|
player->hud->SetStateInt( "rank_self", 0 );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4397,6 +4397,8 @@ idPlayer::NextWeapon
|
||||||
*/
|
*/
|
||||||
void idPlayer::NextWeapon( void ) {
|
void idPlayer::NextWeapon( void ) {
|
||||||
|
|
||||||
|
return; // DG: don't run into endless loop when using mousewheel due to lack of weapons
|
||||||
|
|
||||||
const char *weap;
|
const char *weap;
|
||||||
int w;
|
int w;
|
||||||
|
|
||||||
|
@ -4453,6 +4455,8 @@ idPlayer::PrevWeapon
|
||||||
*/
|
*/
|
||||||
void idPlayer::PrevWeapon( void ) {
|
void idPlayer::PrevWeapon( void ) {
|
||||||
|
|
||||||
|
return; // DG: don't run into endless loop when using mousewheel due to lack of weapons
|
||||||
|
|
||||||
const char *weap;
|
const char *weap;
|
||||||
int w;
|
int w;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue