From 07a7cade70f816bd102d251bb8d944417e87ce6f Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 26 Jul 2020 17:55:22 +0200 Subject: [PATCH] - removed dead weaponswitch variable --- source/games/duke/src/game.cpp | 3 +-- source/games/duke/src/player.cpp | 1 - source/games/duke/src/savegame.cpp | 1 - source/games/duke/src/types.h | 4 ++-- wadsrc/static/engine/menudef.txt | 2 +- 5 files changed, 4 insertions(+), 7 deletions(-) diff --git a/source/games/duke/src/game.cpp b/source/games/duke/src/game.cpp index 0882de486..52f71eb48 100644 --- a/source/games/duke/src/game.cpp +++ b/source/games/duke/src/game.cpp @@ -115,7 +115,7 @@ static void genspriteremaps(void) for (int k = 0; k < 768; k++) // Build uses 6 bit VGA palettes. paldata[k] = (paldata[k] << 2) | (paldata[k] >> 6); - paletteSetColorTable(j, paldata, j == DREALMSPAL || j == ENDINGPAL, j < DREALMSPAL); + paletteSetColorTable(j, paldata, j == DREALMSPAL || j == ENDINGPAL, j > SLIMEPAL); } for (int i = 0; i < 256; i++) @@ -403,7 +403,6 @@ static void Startup(void) for (int j = numplayers; j < ud.multimode; j++) { mysnprintf(ud.user_name[j], sizeof(ud.user_name[j]), "%s %d", GStrings("PLAYER"), j + 1); - ps[j].weaponswitch = 3; ps[j].auto_aim = 0; } diff --git a/source/games/duke/src/player.cpp b/source/games/duke/src/player.cpp index d621438a3..3a823736d 100644 --- a/source/games/duke/src/player.cpp +++ b/source/games/duke/src/player.cpp @@ -79,7 +79,6 @@ void setlocalplayerinput(player_struct* pp) { pp->aim_mode = in_mousemode; pp->auto_aim = cl_autoaim; - pp->weaponswitch = cl_weaponswitch; } //--------------------------------------------------------------------------- diff --git a/source/games/duke/src/savegame.cpp b/source/games/duke/src/savegame.cpp index bad00b1fc..57cf983e7 100644 --- a/source/games/duke/src/savegame.cpp +++ b/source/games/duke/src/savegame.cpp @@ -149,7 +149,6 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, player_struct& w, ("crack_time", w.crack_time) ("aim.mode", w.aim_mode) ("auto_aim", w.auto_aim) - ("weaponswitch", w.weaponswitch) ("angvel", w.angvel) ("cursectnum", w.cursectnum) ("last_extra", w.last_extra) diff --git a/source/games/duke/src/types.h b/source/games/duke/src/types.h index 51d6cdbaa..9b079bce9 100644 --- a/source/games/duke/src/types.h +++ b/source/games/duke/src/types.h @@ -69,7 +69,7 @@ struct user_defs int folfvel, folavel, folx, foly, fola; int reccnt; - int runkey_mode, weaponswitch; + int runkey_mode; int entered_name, shadows, executions, auto_run; int coords, tickrate, levelstats, m_coop, coop; @@ -124,7 +124,7 @@ struct player_struct int bobcounter, weapon_sway; int pals_time, randomflamex, crack_time; - int aim_mode, auto_aim, weaponswitch; + int aim_mode, auto_aim; short angvel, cursectnum, last_extra, subweapon; short ammo_amount[MAX_WEAPONS], wackedbyactor, frag, fraggedself; diff --git a/wadsrc/static/engine/menudef.txt b/wadsrc/static/engine/menudef.txt index f1baed067..534681e99 100644 --- a/wadsrc/static/engine/menudef.txt +++ b/wadsrc/static/engine/menudef.txt @@ -927,7 +927,7 @@ OptionMenu GameplayOptions //protected { Option "$PLRMNU_EQUIP", "cl_weaponswitch", "OnOff" // does not have the 'preferred' option. } - else + ifgame(Blood) { Option "$PLRMNU_EQUIP", "cl_weaponswitch", "WeapSwitch" }