From f7eaa41d103d6a57a4ed9d3c61176aa4e12abd0b Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Mon, 1 Mar 2021 12:01:12 +0100 Subject: [PATCH] Revamp ini options and sync in multiplayer [NetMsg] F12=Now you DIE! F11=Here's something for you. F10=Follow me. F9=I need help! Come Here! [Game] Speed=50 Fast Walk=1 Grab Input=0 Theo Quest=0 Cow Quest=0 [Audio] Sound Volume=0 Music Volume=0 Walking Sound=1 [Graphics] Fullscreen=1 Fit to Screen=1 Scaling Quality=2 Integer Scaling=0 Vertical Sync=1 Blended Transparency=1 Gamma Correction=100 Color Cycling=1 [Diablo] Intro=0 [Hellfire] Intro=0 SItem= [Phone Book] Entry1=127.0.0.1 [Network] Bind Address=0.0.0.0 --- SourceX/DiabloUI/selgame.cpp | 12 ++++++------ SourceX/DiabloUI/selgame.h | 2 +- SourceX/DiabloUI/selhero.cpp | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/SourceX/DiabloUI/selgame.cpp b/SourceX/DiabloUI/selgame.cpp index 1769a1a0f..eb2e54974 100644 --- a/SourceX/DiabloUI/selgame.cpp +++ b/SourceX/DiabloUI/selgame.cpp @@ -18,8 +18,8 @@ bool selgame_enteringGame; int selgame_selectedGame; bool selgame_endMenu; int *gdwPlayerId; -int gbDifficulty; -int gbTickRate; +int nDifficulty; +int nTickRate; int heroLevel; static _SNETPROGRAMDATA *m_client_info; @@ -243,7 +243,7 @@ void selgame_Diff_Select(int value) return; } - gbDifficulty = value; + nDifficulty = value; if (!selhero_isMultiPlayer) { selhero_endMenu = true; @@ -338,7 +338,7 @@ void selgame_Speed_Esc() void selgame_Speed_Select(int value) { - gbTickRate = vecSelGameDlgItems[value]->m_value; + nTickRate = vecSelGameDlgItems[value]->m_value; if (provider == SELCONN_LOOPBACK) { selgame_Password_Select(0); @@ -428,8 +428,8 @@ void selgame_Password_Select(int value) } GameData *data = m_client_info->initdata; - data->nDifficulty = gbDifficulty; - data->nTickRate = sgOptions.nTickRate; + data->nDifficulty = nDifficulty; + data->nTickRate = nTickRate; data->bJogInTown = sgOptions.bJogInTown; data->bTheoQuest = sgOptions.bTheoQuest; data->bCowQuest = sgOptions.bCowQuest; diff --git a/SourceX/DiabloUI/selgame.h b/SourceX/DiabloUI/selgame.h index 25a6a3d29..a19e50da9 100644 --- a/SourceX/DiabloUI/selgame.h +++ b/SourceX/DiabloUI/selgame.h @@ -2,7 +2,7 @@ namespace dvl { -extern int gbDifficulty; +extern int nDifficulty; void selgame_GameSelection_Init(); void selgame_GameSelection_Focus(int value); diff --git a/SourceX/DiabloUI/selhero.cpp b/SourceX/DiabloUI/selhero.cpp index 30652c5a0..0ceea9c34 100644 --- a/SourceX/DiabloUI/selhero.cpp +++ b/SourceX/DiabloUI/selhero.cpp @@ -539,7 +539,7 @@ void UiSelHeroSingDialog( { selhero_isMultiPlayer = false; UiSelHeroDialog(fninfo, fncreate, fnstats, fnremove, dlgresult, name); - *difficulty = gbDifficulty; + *difficulty = nDifficulty; } void UiSelHeroMultDialog(