mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-11 18:50:46 +00:00
- refactored autorunning CVARs
This commit is contained in:
parent
87653b50d4
commit
dbe3cadd0f
24 changed files with 62 additions and 106 deletions
|
@ -468,7 +468,7 @@ endif()
|
|||
if (WIN32)
|
||||
include_directories( "${ZLIB_INCLUDE_DIR}" "${BZIP2_INCLUDE_DIR}" "${LZMA_INCLUDE_DIR}" "${JPEG_INCLUDE_DIR}" "${GDTOA_INCLUDE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/../platform/windows/include" "${CMAKE_CURRENT_SOURCE_DIR}/../platform/windows/include/vpx" "${CMAKE_CURRENT_SOURCE_DIR}/../platform/windows/include/sdl2")
|
||||
else ()
|
||||
include_directories( "${ZLIB_INCLUDE_DIR}" "${BZIP2_INCLUDE_DIR}" "${LZMA_INCLUDE_DIR}" "${JPEG_INCLUDE_DIR}" "${GME_INCLUDE_DIR}" "${ENET_INCLUDE_DIR}" "${GDTOA_INCLUDE_DIR}")
|
||||
include_directories( "${ZLIB_INCLUDE_DIR}" "${BZIP2_INCLUDE_DIR}" "${LZMA_INCLUDE_DIR}" "${JPEG_INCLUDE_DIR}" "${GDTOA_INCLUDE_DIR}")
|
||||
endif()
|
||||
|
||||
|
||||
|
|
|
@ -101,7 +101,6 @@ int32_t gShowWeapon;
|
|||
int32_t gMouseSensitivity;
|
||||
int32_t gMouseAiming;
|
||||
int32_t gMouseAimingFlipped;
|
||||
int32_t gRunKeyMode;
|
||||
bool gNoClip;
|
||||
bool gInfiniteAmmo;
|
||||
bool gFullMap;
|
||||
|
@ -358,7 +357,6 @@ void CONFIG_SetDefaults(void)
|
|||
//ud.msgdisptime = 120;
|
||||
//ud.obituaries = 1;
|
||||
//ud.pwlockout[0] = '\0';
|
||||
gRunKeyMode = 0;
|
||||
//ud.screen_size = 4;
|
||||
//ud.screen_tilting = 1;
|
||||
//ud.screenfade = 1;
|
||||
|
|
|
@ -82,7 +82,6 @@ extern int32_t gShowWeapon;
|
|||
extern int32_t gMouseSensitivity;
|
||||
extern int32_t gMouseAiming;
|
||||
extern int32_t gMouseAimingFlipped;
|
||||
extern int32_t gRunKeyMode;
|
||||
extern bool gNoClip;
|
||||
extern bool gInfiniteAmmo;
|
||||
extern bool gFullMap;
|
||||
|
|
|
@ -404,8 +404,8 @@ void ctrlGetInput(void)
|
|||
gInput.keyFlags.holsterWeapon = 1;
|
||||
}
|
||||
|
||||
char run = gRunKeyMode ? (BUTTON(gamefunc_Run) | gAutoRun) : (BUTTON(gamefunc_Run) ^ gAutoRun);
|
||||
char run2 = BUTTON(gamefunc_Run);
|
||||
char run = G_CheckAutorun(BUTTON(gamefunc_Run));
|
||||
char run2 = false; // What??? BUTTON(gamefunc_Run);
|
||||
|
||||
gInput.syncFlags.run = run;
|
||||
|
||||
|
|
|
@ -411,7 +411,7 @@ static MenuOptionSet_t MEOS_GAMESETUP_AIM_AUTO = MAKE_MENUOPTIONSET( MEOSN_GAMES
|
|||
static MenuOption_t MEO_GAMESETUP_AIM_AUTO = MAKE_MENUOPTION( &MF_Redfont, &MEOS_GAMESETUP_AIM_AUTO, &ud.config.AutoAim );
|
||||
static MenuEntry_t ME_GAMESETUP_AIM_AUTO = MAKE_MENUENTRY( "Auto aim:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_GAMESETUP_AIM_AUTO, Option );
|
||||
|
||||
static MenuOption_t MEO_GAMESETUP_ALWAYS_RUN = MAKE_MENUOPTION( &MF_Redfont, &MEOS_NoYes, &ud.auto_run);
|
||||
static MenuOption_t MEO_GAMESETUP_ALWAYS_RUN = MAKE_MENUOPTION( &MF_Redfont, &MEOS_NoYes, &cl_autorun.Value);
|
||||
static MenuEntry_t ME_GAMESETUP_ALWAYS_RUN = MAKE_MENUENTRY( "Always run:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_GAMESETUP_ALWAYS_RUN, Option );
|
||||
|
||||
static char const *MEOSN_GAMESETUP_WEAPSWITCH_PICKUP[] = { "Never", "If new", /*"If favored",*/ };
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#include <stdio.h>
|
||||
|
||||
#include "gameconfigfile.h"
|
||||
//#include "c_cvars.h"
|
||||
#include "c_cvars.h"
|
||||
//#include "c_dispatch.h"
|
||||
//#include "c_bind.h"
|
||||
#include "m_argv.h"
|
||||
|
@ -258,7 +258,6 @@ void FGameConfigFile::DoGameSetup (const char *gamename)
|
|||
|
||||
// The NetServerInfo section will be read and override anything loaded
|
||||
// here when it's determined that a netgame is being played.
|
||||
#if 0
|
||||
strncpy (subsection, "LocalServerInfo", sublen);
|
||||
if (SetSection (section))
|
||||
{
|
||||
|
@ -270,7 +269,6 @@ void FGameConfigFile::DoGameSetup (const char *gamename)
|
|||
{
|
||||
ReadCVars (0);
|
||||
}
|
||||
#endif
|
||||
strncpy (subsection, "ConsoleAliases", sublen);
|
||||
if (SetSection (section))
|
||||
{
|
||||
|
@ -330,28 +328,17 @@ void FGameConfigFile::DoKeySetup(const char *gamename)
|
|||
|
||||
void FGameConfigFile::ReadNetVars ()
|
||||
{
|
||||
#if 0
|
||||
strncpy (subsection, "NetServerInfo", sublen);
|
||||
if (SetSection (section))
|
||||
{
|
||||
ReadCVars (0);
|
||||
}
|
||||
if (bModSetup)
|
||||
{
|
||||
mysnprintf(subsection, sublen, "NetServerInfo.Mod");
|
||||
if (SetSection(section))
|
||||
{
|
||||
ReadCVars(CVAR_MOD|CVAR_SERVERINFO|CVAR_IGNORE);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// Read cvars from a cvar section of the ini. Flags are the flags to give
|
||||
// to newly-created cvars that were not already defined.
|
||||
void FGameConfigFile::ReadCVars (uint32_t flags)
|
||||
{
|
||||
/*
|
||||
const char *key, *value;
|
||||
FBaseCVar *cvar;
|
||||
UCVarValue val;
|
||||
|
@ -367,7 +354,6 @@ void FGameConfigFile::ReadCVars (uint32_t flags)
|
|||
val.String = const_cast<char *>(value);
|
||||
cvar->SetGenericRep (val, CVAR_String);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
void FGameConfigFile::ArchiveGameData (const char *gamename)
|
||||
|
@ -380,12 +366,12 @@ void FGameConfigFile::ArchiveGameData (const char *gamename)
|
|||
strncpy (subsection, "Player", sublen);
|
||||
SetSection (section, true);
|
||||
ClearCurrentSection ();
|
||||
//C_ArchiveCVars (this, CVAR_ARCHIVE|CVAR_USERINFO);
|
||||
C_ArchiveCVars (this, CVAR_ARCHIVE|CVAR_USERINFO);
|
||||
|
||||
strncpy (subsection, "ConsoleVariables", sublen);
|
||||
SetSection (section, true);
|
||||
ClearCurrentSection ();
|
||||
//C_ArchiveCVars (this, CVAR_ARCHIVE);
|
||||
C_ArchiveCVars (this, CVAR_ARCHIVE);
|
||||
|
||||
#if 0
|
||||
// Do not overwrite the serverinfo section if playing a netgame, and
|
||||
|
@ -395,14 +381,14 @@ void FGameConfigFile::ArchiveGameData (const char *gamename)
|
|||
strncpy (subsection, netgame ? "NetServerInfo" : "LocalServerInfo", sublen);
|
||||
SetSection (section, true);
|
||||
ClearCurrentSection ();
|
||||
//C_ArchiveCVars (this, CVAR_ARCHIVE|CVAR_SERVERINFO);
|
||||
C_ArchiveCVars (this, CVAR_ARCHIVE|CVAR_SERVERINFO);
|
||||
}
|
||||
#endif
|
||||
|
||||
strncpy (subsection, "UnknownConsoleVariables", sublen);
|
||||
SetSection (section, true);
|
||||
ClearCurrentSection ();
|
||||
//C_ArchiveCVars (this, CVAR_ARCHIVE|CVAR_AUTO);
|
||||
C_ArchiveCVars (this, CVAR_ARCHIVE|CVAR_AUTO);
|
||||
|
||||
strncpy (subsection, "ConsoleAliases", sublen);
|
||||
SetSection (section, true);
|
||||
|
@ -432,11 +418,11 @@ void FGameConfigFile::ArchiveGlobalData ()
|
|||
|
||||
SetSection ("GlobalSettings", true);
|
||||
ClearCurrentSection ();
|
||||
//C_ArchiveCVars (this, CVAR_ARCHIVE|CVAR_GLOBALCONFIG);
|
||||
C_ArchiveCVars (this, CVAR_ARCHIVE|CVAR_GLOBALCONFIG);
|
||||
|
||||
SetSection ("GlobalSettings.Unknown", true);
|
||||
ClearCurrentSection ();
|
||||
//C_ArchiveCVars (this, CVAR_ARCHIVE|CVAR_GLOBALCONFIG|CVAR_AUTO);
|
||||
C_ArchiveCVars (this, CVAR_ARCHIVE|CVAR_GLOBALCONFIG|CVAR_AUTO);
|
||||
}
|
||||
|
||||
FString FGameConfigFile::GetConfigPath (bool tryProg)
|
||||
|
|
|
@ -1,8 +1,18 @@
|
|||
#include "c_cvars.h"
|
||||
#include "common.h"
|
||||
|
||||
/* Notes
|
||||
|
||||
RedNukem has this for the toggle autorun command. Todo: Check what this is supposed to accomplish. The implementation makes no sense at all.
|
||||
(!RRRA || (!g_player[myconnectindex].ps->on_motorcycle && !g_player[myconnectindex].ps->on_boat)))
|
||||
|
||||
|
||||
*/
|
||||
|
||||
CVARD(Bool, cl_crosshair, true, CVAR_ARCHIVE, "enable/disable crosshair");
|
||||
CVARD(Bool, cl_automsg, false, CVAR_ARCHIVE, "enable/disable automatically sending messages to all players")
|
||||
CVARD(Bool, cl_autorun, true, CVAR_ARCHIVE, "enable/disable autorun")
|
||||
CVARD(Bool, cl_runmode, true, CVAR_ARCHIVE, "enable/disable modernized run key operation")
|
||||
|
||||
CUSTOM_CVARD(Int, cl_autoaim, 1, CVAR_ARCHIVE, "enable/disable weapon autoaim")
|
||||
{
|
||||
|
@ -11,6 +21,12 @@ CUSTOM_CVARD(Int, cl_autoaim, 1, CVAR_ARCHIVE, "enable/disable weapon autoaim")
|
|||
};
|
||||
|
||||
|
||||
bool G_CheckAutorun(bool button)
|
||||
{
|
||||
if (cl_runmode) return button || cl_autorun;
|
||||
else return button ^ !!cl_autorun;
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
{ "cl_autorun", "enable/disable autorun", (void *)&ud.auto_run, CVAR_BOOL, 0, 1 },
|
||||
|
@ -19,6 +35,7 @@ CUSTOM_CVARD(Int, cl_autoaim, 1, CVAR_ARCHIVE, "enable/disable weapon autoaim")
|
|||
{ "cl_runmode", "enable/disable modernized run key operation", (void *)&ud.runkey_mode, CVAR_BOOL, 0, 1 },
|
||||
|
||||
|
||||
|
||||
// DN3D
|
||||
static osdcvardata_t cvars_game[] =
|
||||
{
|
||||
|
|
|
@ -3,3 +3,14 @@
|
|||
EXTERN_CVAR(Bool, cl_crosshair)
|
||||
EXTERN_CVAR(Bool, cl_automsg)
|
||||
EXTERN_CVAR(Int, cl_autoaim)
|
||||
EXTERN_CVAR(Bool, cl_autorun)
|
||||
EXTERN_CVAR(Bool, cl_runmode)
|
||||
|
||||
CUSTOM_CVARD(Int, cl_autoaim, 1, CVAR_ARCHIVE, "enable/disable weapon autoaim")
|
||||
{
|
||||
if (self < 0 || self > (playing_blood? 2 : 3)) self = 1; // Note: The Shadow Warrior backend only has a bool for this.
|
||||
//UpdatePlayerFromMenu(); todo: networking (only operational in EDuke32 frontend anyway.)
|
||||
};
|
||||
|
||||
|
||||
bool G_CheckAutorun(bool button);
|
||||
|
|
|
@ -254,7 +254,6 @@ void CONFIG_SetDefaults(void)
|
|||
|
||||
ud.althud = 1;
|
||||
ud.angleinterpolation = 0;
|
||||
ud.auto_run = 1;
|
||||
ud.autosave = 1;
|
||||
ud.autosavedeletion = 1;
|
||||
ud.autovote = 0;
|
||||
|
|
|
@ -5049,8 +5049,8 @@ FAKE_F3:
|
|||
if (BUTTON(gamefunc_AutoRun))
|
||||
{
|
||||
CONTROL_ClearButton(gamefunc_AutoRun);
|
||||
ud.auto_run = 1-ud.auto_run;
|
||||
P_DoQuote(QUOTE_RUN_MODE_OFF + ud.auto_run, &myplayer);
|
||||
cl_autorun= 1-cl_autorun;
|
||||
P_DoQuote(QUOTE_RUN_MODE_OFF + cl_autorun, &myplayer);
|
||||
}
|
||||
|
||||
if (BUTTON(gamefunc_Map))
|
||||
|
@ -6760,7 +6760,6 @@ MAIN_LOOP_RESTART:
|
|||
|
||||
// G_GameExit(" "); ///
|
||||
|
||||
// ud.auto_run = ud.config.RunMode;
|
||||
ud.showweapons = ud.config.ShowWeapons;
|
||||
P_SetupMiscInputSettings();
|
||||
g_player[myconnectindex].pteam = ud.team;
|
||||
|
|
|
@ -186,7 +186,7 @@ typedef struct {
|
|||
int32_t menu_slidebarz, menu_slidebarmargin, menu_slidecursorz;
|
||||
int32_t menu_scrollbartilenum, menu_scrollbarz, menu_scrollcursorz;
|
||||
|
||||
int32_t entered_name,screen_tilting,shadows,fta_on,executions,auto_run;
|
||||
int32_t entered_name,screen_tilting,shadows,fta_on,executions;
|
||||
int32_t coords,showfps,levelstats,m_coop,coop,screen_size,lockout;
|
||||
int32_t playerai,angleinterpolation,obituaries;
|
||||
|
||||
|
|
|
@ -1411,7 +1411,7 @@ int32_t __fastcall VM_GetUserdef(int32_t labelNum, int const lParm2)
|
|||
case USERDEFS_SHADOWS: labelNum = ud.shadows; break;
|
||||
case USERDEFS_FTA_ON: labelNum = ud.fta_on; break;
|
||||
case USERDEFS_EXECUTIONS: labelNum = ud.executions; break;
|
||||
case USERDEFS_AUTO_RUN: labelNum = ud.auto_run; break;
|
||||
case USERDEFS_AUTO_RUN: labelNum = cl_autorun; break;
|
||||
case USERDEFS_COORDS: labelNum = ud.coords; break;
|
||||
case USERDEFS_TICKRATE: labelNum = ud.showfps; break;
|
||||
case USERDEFS_M_COOP: labelNum = ud.m_coop; break;
|
||||
|
@ -1607,7 +1607,7 @@ void __fastcall VM_SetUserdef(int const labelNum, int const lParm2, int32_t cons
|
|||
case USERDEFS_SHADOWS: ud.shadows = iSet; break;
|
||||
case USERDEFS_FTA_ON: ud.fta_on = iSet; break;
|
||||
case USERDEFS_EXECUTIONS: ud.executions = iSet; break;
|
||||
case USERDEFS_AUTO_RUN: ud.auto_run = iSet; break;
|
||||
case USERDEFS_AUTO_RUN: cl_autorun = iSet; break; //!!!
|
||||
case USERDEFS_COORDS: ud.coords = iSet; break;
|
||||
case USERDEFS_TICKRATE: ud.showfps = iSet; break;
|
||||
case USERDEFS_M_COOP: ud.m_coop = iSet; break;
|
||||
|
|
|
@ -410,7 +410,7 @@ static MenuOptionSet_t MEOS_GAMESETUP_AIM_AUTO = MAKE_MENUOPTIONSET( MEOSN_GAMES
|
|||
static MenuOption_t MEO_GAMESETUP_AIM_AUTO = MAKE_MENUOPTION( &MF_Redfont, &MEOS_GAMESETUP_AIM_AUTO, &cl_autoaim.Value );
|
||||
static MenuEntry_t ME_GAMESETUP_AIM_AUTO = MAKE_MENUENTRY( "Auto aim:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_GAMESETUP_AIM_AUTO, Option );
|
||||
|
||||
static MenuOption_t MEO_GAMESETUP_ALWAYS_RUN = MAKE_MENUOPTION( &MF_Redfont, &MEOS_NoYes, &ud.auto_run);
|
||||
static MenuOption_t MEO_GAMESETUP_ALWAYS_RUN = MAKE_MENUOPTION( &MF_Redfont, &MEOS_NoYes, &cl_autorun.Value);
|
||||
static MenuEntry_t ME_GAMESETUP_ALWAYS_RUN = MAKE_MENUENTRY( "Always run:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_GAMESETUP_ALWAYS_RUN, Option );
|
||||
|
||||
static char const *MEOSN_GAMESETUP_WEAPSWITCH_PICKUP[] = { "Never", "If new", /*"If favored",*/ };
|
||||
|
|
|
@ -26,6 +26,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "demo.h"
|
||||
#include "enet.h"
|
||||
#include "sjson.h"
|
||||
#include "gamcvars.h"
|
||||
|
||||
BEGIN_DUKE_NS
|
||||
|
||||
|
@ -2944,7 +2945,7 @@ void P_GetInput(int const playerNum)
|
|||
}
|
||||
|
||||
// JBF: Run key behaviour is selectable
|
||||
int const playerRunning = (ud.runkey_mode) ? (BUTTON(gamefunc_Run) | ud.auto_run) : (ud.auto_run ^ BUTTON(gamefunc_Run));
|
||||
int const playerRunning = G_CheckAutorun(BUTTON(gamefunc_Run));
|
||||
int const turnAmount = playerRunning ? (NORMALTURN << 1) : NORMALTURN;
|
||||
constexpr int const analogTurnAmount = (NORMALTURN << 1);
|
||||
int const keyMove = playerRunning ? (NORMALKEYMOVE << 1) : NORMALKEYMOVE;
|
||||
|
|
|
@ -1403,7 +1403,6 @@ static const dataspec_t svgm_udnetw[] =
|
|||
{ DS_NOCHK, &ud.respawn_items, sizeof(ud.respawn_items), 1 },
|
||||
{ DS_NOCHK, &ud.respawn_inventory, sizeof(ud.respawn_inventory), 1 },
|
||||
{ 0, &ud.god, sizeof(ud.god), 1 },
|
||||
{ 0, &ud.auto_run, sizeof(ud.auto_run), 1 },
|
||||
{ DS_NOCHK, &ud.monsters_off, sizeof(ud.monsters_off), 1 },
|
||||
{ DS_NOCHK, &ud.last_level, sizeof(ud.last_level), 1 },
|
||||
{ 0, &ud.eog, sizeof(ud.eog), 1 },
|
||||
|
|
|
@ -234,7 +234,6 @@ void CONFIG_SetDefaults(void)
|
|||
ud.config.NumVoices = 64;
|
||||
#endif
|
||||
ud.config.ReverseStereo = 0;
|
||||
ud.auto_run = 1;
|
||||
ud.config.ShowOpponentWeapons = 0;
|
||||
ud.config.SmoothInput = 1;
|
||||
ud.config.SoundToggle = 1;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//-------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------
|
||||
/*
|
||||
Copyright (C) 2016 EDuke32 developers and contributors
|
||||
|
||||
|
@ -6560,11 +6560,11 @@ FAKE_F3:
|
|||
G_UpdateScreenArea();
|
||||
}
|
||||
|
||||
if (BUTTON(gamefunc_AutoRun) && (!RRRA || (!g_player[myconnectindex].ps->on_motorcycle && !g_player[myconnectindex].ps->on_boat)))
|
||||
if (BUTTON(gamefunc_AutoRun))
|
||||
{
|
||||
CONTROL_ClearButton(gamefunc_AutoRun);
|
||||
ud.auto_run = 1-ud.auto_run;
|
||||
P_DoQuote(QUOTE_RUN_MODE_OFF+ud.auto_run,g_player[myconnectindex].ps);
|
||||
cl_autorun = !cl_autorun;
|
||||
P_DoQuote(QUOTE_RUN_MODE_OFF+cl_autorun,g_player[myconnectindex].ps);
|
||||
}
|
||||
|
||||
if (BUTTON(gamefunc_Map))
|
||||
|
@ -8137,7 +8137,6 @@ MAIN_LOOP_RESTART:
|
|||
|
||||
// G_GameExit(" "); ///
|
||||
|
||||
// ud.auto_run = ud.config.RunMode;
|
||||
ud.showweapons = ud.config.ShowOpponentWeapons;
|
||||
P_SetupMiscInputSettings();
|
||||
g_player[myconnectindex].pteam = ud.team;
|
||||
|
|
|
@ -165,7 +165,7 @@ typedef struct {
|
|||
int32_t menu_slidebarz, menu_slidebarmargin, menu_slidecursorz;
|
||||
int32_t menu_scrollbartilenum, menu_scrollbarz, menu_scrollcursorz;
|
||||
|
||||
int32_t entered_name,screen_tilting,shadows,fta_on,executions,auto_run;
|
||||
int32_t entered_name,screen_tilting,shadows,fta_on,executions;
|
||||
int32_t coords,showfps,levelstats,m_coop,coop,screen_size,lockout,crosshair;
|
||||
int32_t playerai,angleinterpolation,obituaries;
|
||||
|
||||
|
|
|
@ -2795,7 +2795,9 @@ void P_GetInput(int playerNum)
|
|||
}
|
||||
|
||||
// JBF: Run key behaviour is selectable
|
||||
int const playerRunning = (ud.runkey_mode) ? (BUTTON(gamefunc_Run) | ud.auto_run) : (ud.auto_run ^ BUTTON(gamefunc_Run));
|
||||
int playerRunning = false;
|
||||
|
||||
int const playerRunning = G_CheckAutorun(BUTTON(gamefunc_Run));
|
||||
int const turnAmount = playerRunning ? (NORMALTURN << 1) : NORMALTURN;
|
||||
constexpr int const analogTurnAmount = (NORMALTURN << 1);
|
||||
int const keyMove = playerRunning ? (NORMALKEYMOVE << 1) : NORMALKEYMOVE;
|
||||
|
@ -3100,7 +3102,7 @@ void P_GetInputMotorcycle(int playerNum)
|
|||
}
|
||||
|
||||
// JBF: Run key behaviour is selectable
|
||||
int const playerRunning = (ud.runkey_mode) ? (BUTTON(gamefunc_Run) | ud.auto_run) : (ud.auto_run ^ BUTTON(gamefunc_Run));
|
||||
int const playerRunning = G_CheckAutorun(BUTTON(gamefunc_Run));
|
||||
constexpr int const analogTurnAmount = (NORMALTURN << 1);
|
||||
int const keyMove = playerRunning ? (NORMALKEYMOVE << 1) : NORMALKEYMOVE;
|
||||
constexpr int const analogExtent = 32767; // KEEPINSYNC sdlayer.cpp
|
||||
|
@ -3398,7 +3400,7 @@ void P_GetInputBoat(int playerNum)
|
|||
}
|
||||
|
||||
// JBF: Run key behaviour is selectable
|
||||
int const playerRunning = (ud.runkey_mode) ? (BUTTON(gamefunc_Run) | ud.auto_run) : (ud.auto_run ^ BUTTON(gamefunc_Run));
|
||||
int const playerRunning = G_CheckAutorun(BUTTON(gamefunc_Run));
|
||||
constexpr int const analogTurnAmount = (NORMALTURN << 1);
|
||||
int const keyMove = playerRunning ? (NORMALKEYMOVE << 1) : NORMALKEYMOVE;
|
||||
constexpr int const analogExtent = 32767; // KEEPINSYNC sdlayer.cpp
|
||||
|
|
|
@ -1089,7 +1089,6 @@ static const dataspec_t svgm_udnetw[] =
|
|||
{ DS_NOCHK, &ud.respawn_items, sizeof(ud.respawn_items), 1 },
|
||||
{ DS_NOCHK, &ud.respawn_inventory, sizeof(ud.respawn_inventory), 1 },
|
||||
{ 0, &ud.god, sizeof(ud.god), 1 },
|
||||
{ 0, &ud.auto_run, sizeof(ud.auto_run), 1 },
|
||||
{ DS_NOCHK, &ud.monsters_off, sizeof(ud.monsters_off), 1 },
|
||||
{ DS_NOCHK, &ud.last_level, sizeof(ud.last_level), 1 },
|
||||
{ 0, &ud.eog, sizeof(ud.eog), 1 },
|
||||
|
|
|
@ -3056,12 +3056,6 @@ void InitPlayerGameSettings(void)
|
|||
RESET(Player[myconnectindex].Flags, PF_AUTO_AIM);
|
||||
}
|
||||
|
||||
// everyone had their own Auto Run
|
||||
if (gs.AutoRun)
|
||||
SET(Player[myconnectindex].Flags, PF_LOCK_RUN);
|
||||
else
|
||||
RESET(Player[myconnectindex].Flags, PF_LOCK_RUN);
|
||||
|
||||
if (gs.MouseAimingOn)
|
||||
SET(Player[myconnectindex].Flags, PF_MOUSE_AIMING_ON);
|
||||
else
|
||||
|
@ -5143,7 +5137,7 @@ getinput(SW_PACKET *loc)
|
|||
|
||||
SET_LOC_KEY(loc->bits, SK_SPACE_BAR, ((!!KEY_PRESSED(KEYSC_SPACE)) | BUTTON(gamefunc_Open)));
|
||||
|
||||
running = BUTTON(gamefunc_Run) || TEST(pp->Flags, PF_LOCK_RUN);
|
||||
running = G_CheckAutorun(BUTTON(gamefunc_Run));
|
||||
|
||||
if (BUTTON(gamefunc_Strafe) && !pp->sop)
|
||||
svel = -info.dyaw;
|
||||
|
@ -5260,15 +5254,6 @@ getinput(SW_PACKET *loc)
|
|||
loc->angvel = angvel;
|
||||
loc->aimvel = aimvel;
|
||||
|
||||
if (MenuButtonAutoRun)
|
||||
{
|
||||
MenuButtonAutoRun = FALSE;
|
||||
if ((!!TEST(pp->Flags, PF_LOCK_RUN)) != !!gs.AutoRun)
|
||||
SET_LOC_KEY(loc->bits, SK_RUN_LOCK, TRUE);
|
||||
}
|
||||
|
||||
SET_LOC_KEY(loc->bits, SK_RUN_LOCK, BUTTON(gamefunc_AutoRun));
|
||||
|
||||
if (!CommEnabled)
|
||||
{
|
||||
if (MenuButtonAutoAim)
|
||||
|
|
|
@ -259,7 +259,6 @@ extern char MessageOutputString[256];
|
|||
#define SK_AUTO_AIM 7
|
||||
#define SK_CENTER_VIEW 8
|
||||
#define SK_PAUSE 9
|
||||
#define SK_RUN_LOCK 10
|
||||
|
||||
#define SK_MESSAGE 11
|
||||
#define SK_LOOK_UP 12
|
||||
|
@ -1252,7 +1251,6 @@ extern PLAYER Player[MAX_SW_PLAYERS_REG+1];
|
|||
#define PF_DIVING (BIT(17))
|
||||
#define PF_DIVING_IN_LAVA (BIT(18))
|
||||
#define PF_TWO_UZI (BIT(19))
|
||||
#define PF_LOCK_RUN (BIT(20))
|
||||
#define PF_TURN_180 (BIT(21))
|
||||
#define PF_DEAD_HEAD (BIT(22)) // are your a dead head
|
||||
#define PF_HEAD_CONTROL (BIT(23)) // have control of turning when a head?
|
||||
|
|
|
@ -1562,12 +1562,6 @@ getpackets(void)
|
|||
pp = Player + otherconnectindex;
|
||||
p = (PACKET_OPTIONSp)packbuf;
|
||||
|
||||
// auto run
|
||||
if (p->AutoRun)
|
||||
SET(pp->Flags, PF_LOCK_RUN);
|
||||
else
|
||||
RESET(pp->Flags, PF_LOCK_RUN);
|
||||
|
||||
// palette
|
||||
pp->TeamColor = p->Color;
|
||||
pp->SpriteP->pal = PALETTE_PLAYER0 + pp->TeamColor;
|
||||
|
|
|
@ -122,21 +122,6 @@ extern SWBOOL FinishedLevel;
|
|||
#define TANK_FRICTION (53248L)
|
||||
#define PLAYER_SLIDE_FRICTION (53248L)
|
||||
|
||||
#define PLAYER_RUN_LOCK(pp) \
|
||||
if (TEST_SYNC_KEY((pp), SK_RUN_LOCK)) \
|
||||
{ \
|
||||
if (FLAG_KEY_PRESSED((pp), SK_RUN_LOCK)) \
|
||||
{ \
|
||||
FLAG_KEY_RELEASE((pp), SK_RUN_LOCK); \
|
||||
FLIP((pp)->Flags, PF_LOCK_RUN); \
|
||||
gs.AutoRun = !!TEST((pp)->Flags, PF_LOCK_RUN); \
|
||||
sprintf(ds, "Run mode %s", TEST((pp)->Flags, PF_LOCK_RUN) ? "ON" : "OFF"); \
|
||||
PutStringInfo((pp), ds); \
|
||||
} \
|
||||
} \
|
||||
else \
|
||||
FLAG_KEY_RESET((pp), SK_RUN_LOCK) \
|
||||
|
||||
#define JUMP_STUFF 4
|
||||
|
||||
// just like 2 except can jump higher - less gravity
|
||||
|
@ -2011,7 +1996,7 @@ DoPlayerBob(PLAYERp pp)
|
|||
dist = 0;
|
||||
|
||||
// if running make a longer stride
|
||||
if (TEST_SYNC_KEY(pp, SK_RUN) || TEST(pp->Flags, PF_LOCK_RUN))
|
||||
if (G_CheckAutorun(TEST_SYNC_KEY(pp, SK_RUN)))
|
||||
{
|
||||
//amt = 10;
|
||||
amt = 12;
|
||||
|
@ -2457,7 +2442,7 @@ MoveScrollMode2D(PLAYERp pp)
|
|||
Follow_posy = pp->posy;
|
||||
}
|
||||
|
||||
running = BUTTON(gamefunc_Run) || TEST(pp->Flags, PF_LOCK_RUN);
|
||||
running = G_CheckAutorun(BUTTON(gamefunc_Run));
|
||||
|
||||
if (BUTTON(gamefunc_Strafe))
|
||||
mfsvel -= scrl_input.dyaw>>2;
|
||||
|
@ -2597,8 +2582,6 @@ DoPlayerMove(PLAYERp pp)
|
|||
|
||||
SlipSlope(pp);
|
||||
|
||||
PLAYER_RUN_LOCK(pp);
|
||||
|
||||
DoPlayerTurn(pp);
|
||||
|
||||
pp->oldposx = pp->posx;
|
||||
|
@ -2863,8 +2846,6 @@ DoPlayerMoveBoat(PLAYERp pp)
|
|||
PlaySOsound(pp->sop->mid_sector,SO_IDLE_SOUND);
|
||||
}
|
||||
|
||||
PLAYER_RUN_LOCK(pp);
|
||||
|
||||
DoPlayerTurnBoat(pp);
|
||||
|
||||
if (PLAYER_MOVING(pp) == 0)
|
||||
|
@ -3270,8 +3251,6 @@ DoPlayerMoveTank(PLAYERp pp)
|
|||
PlaySOsound(pp->sop->mid_sector,SO_IDLE_SOUND);
|
||||
}
|
||||
|
||||
PLAYER_RUN_LOCK(pp);
|
||||
|
||||
if (PLAYER_MOVING(pp) == 0)
|
||||
RESET(pp->Flags, PF_PLAYER_MOVED);
|
||||
else
|
||||
|
@ -3450,8 +3429,6 @@ DoPlayerMoveTurret(PLAYERp pp)
|
|||
short save_sectnum;
|
||||
USERp u = User[pp->PlayerSprite];
|
||||
|
||||
PLAYER_RUN_LOCK(pp);
|
||||
|
||||
DoPlayerTurnTurret(pp);
|
||||
|
||||
if (PLAYER_MOVING(pp) == 0)
|
||||
|
@ -3904,9 +3881,6 @@ DoPlayerClimb(PLAYERp pp)
|
|||
if (dot < 0)
|
||||
climbvel = -climbvel;
|
||||
|
||||
// Run lock - routine doesn't call DoPlayerMove
|
||||
PLAYER_RUN_LOCK(pp);
|
||||
|
||||
// need to rewrite this for FAF stuff
|
||||
|
||||
// Jump off of the ladder
|
||||
|
@ -6852,9 +6826,6 @@ void DoPlayerDeathFollowKiller(PLAYERp pp)
|
|||
// allow turning
|
||||
if ((TEST(pp->Flags, PF_DEAD_HEAD) && pp->input.angvel != 0) || TEST(pp->Flags, PF_HEAD_CONTROL))
|
||||
{
|
||||
// Allow them to turn fast
|
||||
PLAYER_RUN_LOCK(pp);
|
||||
|
||||
DoPlayerTurn(pp);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue