Add toggle for look up/down, also don't trigger it during countdown or when player is respawning
This commit is contained in:
1 parent
8775e5abc1
commit
cf9e7ff37b
4 files changed
+13
-5
No files matched your search
@@ -298,6 +298,8 @@ consvar_t cv_mouseturn = {"mouseturn", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL,
|
||||
// Lagless camera! Yay!
|
||||
consvar_t cv_laglesscam = {"laglesscamera", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
consvar_t cv_verticallook = {"verticallook", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
#if defined(HAVE_SDL) || defined(_WINDOWS) //joystick 1 and 2
|
||||
consvar_t cv_usejoystick[MAXSPLITSCREENPLAYERS] = {
|
||||
{"use_joystick", "1", CV_SAVE|CV_CALL, usejoystick_cons_t, I_InitJoystick1, 0, NULL, NULL, 0, 0, NULL},
|
||||
@@ -1066,6 +1068,8 @@ void D_RegisterClientCommands(void)
|
||||
|
||||
CV_RegisterVar(&cv_laglesscam);
|
||||
|
||||
CV_RegisterVar(&cv_verticallook);
|
||||
|
||||
// ingame object placing
|
||||
COM_AddCommand("objectplace", Command_ObjectPlace_f);
|
||||
COM_AddCommand("writethings", Command_Writethings_f);
|
||||
|
||||
@@ -198,6 +198,8 @@ extern consvar_t cv_betainterscreen;
|
||||
|
||||
extern consvar_t cv_laglesscam;
|
||||
|
||||
extern consvar_t cv_verticallook;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
SKINMENUTYPE_SCROLL = 0,
|
||||
|
||||
+6
-4
@@ -1882,11 +1882,12 @@ static menuitem_t OP_CamOptionsMenu[] =
|
||||
|
||||
{IT_STRING | IT_CVAR, NULL, "Lagless Camera", &cv_laglesscam, 50},
|
||||
{IT_STRING | IT_CVAR, NULL, "Camera Lookback Momentum", &cv_lookbackmom, 60},
|
||||
{IT_STRING | IT_CVAR, NULL, "Camera Vertical Look", &cv_verticallook, 70},
|
||||
|
||||
{IT_STRING | IT_SUBMENU, NULL, "Player 1 Camera options...", &OP_Player1CamOptionsDef, 80},
|
||||
{IT_STRING | IT_SUBMENU, NULL, "Player 2 Camera options...", &OP_Player2CamOptionsDef, 90},
|
||||
{IT_STRING | IT_SUBMENU, NULL, "Player 3 Camera options...", &OP_Player3CamOptionsDef, 100},
|
||||
{IT_STRING | IT_SUBMENU, NULL, "Player 4 Camera options...", &OP_Player4CamOptionsDef, 110},
|
||||
{IT_STRING | IT_SUBMENU, NULL, "Player 1 Camera options...", &OP_Player1CamOptionsDef, 90},
|
||||
{IT_STRING | IT_SUBMENU, NULL, "Player 2 Camera options...", &OP_Player2CamOptionsDef, 100},
|
||||
{IT_STRING | IT_SUBMENU, NULL, "Player 3 Camera options...", &OP_Player3CamOptionsDef, 110},
|
||||
{IT_STRING | IT_SUBMENU, NULL, "Player 4 Camera options...", &OP_Player4CamOptionsDef, 120},
|
||||
};
|
||||
|
||||
static const char* OP_CamOptionsTooltips[] =
|
||||
@@ -1895,6 +1896,7 @@ static const char* OP_CamOptionsTooltips[] =
|
||||
"Player field of view.",
|
||||
"Removes Camera Lag in netgames\nMay cause Camera stutters in poor net conditions.",
|
||||
"Should looking back inherit the Players Momentum?\nEither inherit Player Momentum or double of it\nmay make looking back while boosting or going in high speed less jarring",
|
||||
"Allows looking up/down by holding aim forward/backward while standing still.",
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
+1
-1
@@ -464,7 +464,7 @@ void P_RunChaseCameras(void)
|
||||
player_t *p = &players[displayplayers[i]];
|
||||
camera_t *cam = &camera[i];
|
||||
|
||||
if (p->mo && p->kartstuff[k_throwdir] != 0)
|
||||
if (cv_verticallook.value && leveltime > starttime && p->mo && p->kartstuff[k_respawn] == 0 && p->kartstuff[k_throwdir] != 0)
|
||||
{
|
||||
if (p->speed < 6 * p->mo->scale && abs(cam->dpad_y_held) < 2*TICRATE)
|
||||
cam->dpad_y_held += intsign(p->kartstuff[k_throwdir]);
|
||||
|
||||
Reference in new issue
Block a user