change "verticallook" and "cameralookbackmom" to be per splitscreen player
This commit is contained in:
1 parent
fd9902afd6
commit
475ba7ca10
7 files changed
+52
-23
No files matched your search
+10
-2
@@ -298,7 +298,12 @@ 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};
|
||||
consvar_t cv_verticallook[MAXSPLITSCREENPLAYERS] = {
|
||||
{"verticallook", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"verticallook2", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"verticallook3", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"verticallook4", "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] = {
|
||||
@@ -1077,7 +1082,10 @@ void D_RegisterClientCommands(void)
|
||||
|
||||
CV_RegisterVar(&cv_laglesscam);
|
||||
|
||||
CV_RegisterVar(&cv_verticallook);
|
||||
for (i = 0; i < MAXSPLITSCREENPLAYERS; i++)
|
||||
{
|
||||
CV_RegisterVar(&cv_verticallook[i]);
|
||||
}
|
||||
|
||||
// ingame object placing
|
||||
COM_AddCommand("objectplace", Command_ObjectPlace_f);
|
||||
|
||||
@@ -198,8 +198,6 @@ extern consvar_t cv_betainterscreen;
|
||||
|
||||
extern consvar_t cv_laglesscam;
|
||||
|
||||
extern consvar_t cv_verticallook;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
SKINMENUTYPE_SCROLL = 0,
|
||||
|
||||
+24
-9
@@ -1892,12 +1892,11 @@ 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, 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},
|
||||
{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},
|
||||
};
|
||||
|
||||
static const char* OP_CamOptionsTooltips[] =
|
||||
@@ -1905,8 +1904,6 @@ static const char* OP_CamOptionsTooltips[] =
|
||||
NULL,
|
||||
"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,
|
||||
@@ -1922,6 +1919,10 @@ static menuitem_t OP_Player1CamOptionsMenu[] =
|
||||
{IT_STRING | IT_CVAR | IT_CV_BIGFLOAT, NULL, "Camera Height", &cv_cam_height[0], 60},
|
||||
{IT_STRING | IT_CVAR, NULL, "Camera Speed", &cv_cam_speed[0], 70},
|
||||
|
||||
{IT_STRING | IT_CVAR, NULL, "Camera Lookback Momentum", &cv_lookbackmom[0], 80},
|
||||
|
||||
{IT_STRING | IT_CVAR, NULL, "Camera Vertical Look", &cv_verticallook[0], 90},
|
||||
|
||||
{IT_STRING | IT_CVAR, NULL, "Freecam Speed", &cv_freecam_speed[0], 90},
|
||||
|
||||
{IT_STRING | IT_CVAR, NULL, "Third Person Camera", &cv_chasecam[0], 105},
|
||||
@@ -1936,6 +1937,10 @@ static menuitem_t OP_Player2CamOptionsMenu[] =
|
||||
{IT_STRING | IT_CVAR | IT_CV_BIGFLOAT, NULL, "Camera Height", &cv_cam_height[1], 60},
|
||||
{IT_STRING | IT_CVAR, NULL, "Camera Speed", &cv_cam_speed[1], 70},
|
||||
|
||||
{IT_STRING | IT_CVAR, NULL, "Camera Lookback Momentum", &cv_lookbackmom[1], 80},
|
||||
|
||||
{IT_STRING | IT_CVAR, NULL, "Camera Vertical Look", &cv_verticallook[1], 90},
|
||||
|
||||
{IT_STRING | IT_CVAR, NULL, "Freecam Speed", &cv_freecam_speed[1], 90},
|
||||
|
||||
{IT_STRING | IT_CVAR, NULL, "Third Person Camera", &cv_chasecam[1], 105},
|
||||
@@ -1950,6 +1955,10 @@ static menuitem_t OP_Player3CamOptionsMenu[] =
|
||||
{IT_STRING | IT_CVAR | IT_CV_BIGFLOAT, NULL, "Camera Height", &cv_cam_height[2], 60},
|
||||
{IT_STRING | IT_CVAR, NULL, "Camera Speed", &cv_cam_speed[2], 70},
|
||||
|
||||
{IT_STRING | IT_CVAR, NULL, "Camera Lookback Momentum", &cv_lookbackmom[2], 80},
|
||||
|
||||
{IT_STRING | IT_CVAR, NULL, "Camera Vertical Look", &cv_verticallook[2], 90},
|
||||
|
||||
{IT_STRING | IT_CVAR, NULL, "Freecam Speed", &cv_freecam_speed[2], 90},
|
||||
|
||||
{IT_STRING | IT_CVAR, NULL, "Third Person Camera", &cv_chasecam[2], 105},
|
||||
@@ -1964,9 +1973,13 @@ static menuitem_t OP_Player4CamOptionsMenu[] =
|
||||
{IT_STRING | IT_CVAR | IT_CV_BIGFLOAT, NULL, "Camera Height", &cv_cam_height[3], 60},
|
||||
{IT_STRING | IT_CVAR, NULL, "Camera Speed", &cv_cam_speed[3], 70},
|
||||
|
||||
{IT_STRING | IT_CVAR, NULL, "Freecam Speed", &cv_freecam_speed[3], 90},
|
||||
{IT_STRING | IT_CVAR, NULL, "Camera Lookback Momentum", &cv_lookbackmom[3], 80},
|
||||
|
||||
{IT_STRING | IT_CVAR, NULL, "Third Person Camera", &cv_chasecam[3], 105},
|
||||
{IT_STRING | IT_CVAR, NULL, "Camera Vertical Look", &cv_verticallook[3], 90},
|
||||
|
||||
{IT_STRING | IT_CVAR, NULL, "Freecam Speed", &cv_freecam_speed[3], 100},
|
||||
|
||||
{IT_STRING | IT_CVAR, NULL, "Third Person Camera", &cv_chasecam[3], 115},
|
||||
};
|
||||
|
||||
static const char* OP_PlayerCamOptionsTooltips[] =
|
||||
@@ -1976,6 +1989,8 @@ static const char* OP_PlayerCamOptionsTooltips[] =
|
||||
"Camera distance relative to the Player.",
|
||||
"Height of the Camera",
|
||||
"Speed of the Camera",
|
||||
"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.",
|
||||
"Speed of the Freecam/Spectator Camera",
|
||||
"Toggle between Third or First Person camera",
|
||||
};
|
||||
|
||||
+3
-1
@@ -158,7 +158,9 @@ extern consvar_t cv_tiltsmoothing;
|
||||
|
||||
extern consvar_t cv_actionmovie;
|
||||
|
||||
extern consvar_t cv_lookbackmom;
|
||||
extern consvar_t cv_lookbackmom[MAXSPLITSCREENPLAYERS];
|
||||
|
||||
extern consvar_t cv_verticallook[MAXSPLITSCREENPLAYERS];
|
||||
|
||||
extern fixed_t t_cam_rotate[MAXSPLITSCREENPLAYERS];
|
||||
|
||||
|
||||
+1
-1
@@ -464,7 +464,7 @@ void P_RunChaseCameras(void)
|
||||
player_t *p = &players[displayplayers[i]];
|
||||
camera_t *cam = &camera[i];
|
||||
|
||||
if (cv_verticallook.value && leveltime > starttime && p->mo && p->kartstuff[k_respawn] == 0 && p->kartstuff[k_throwdir] != 0)
|
||||
if (cv_verticallook[i].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]);
|
||||
|
||||
+12
-6
@@ -3095,7 +3095,7 @@ consvar_t cv_cam_timeover[MAXSPLITSCREENPLAYERS] = {
|
||||
{"cam_timeover", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"cam2_timeover", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"cam3_timeover", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"cam4_timeover", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"cam4_timeover", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}
|
||||
};
|
||||
|
||||
static CV_PossibleValue_t freecam_speed_cons_t[] = {{0, "MIN"}, {10, "MAX"}, {0, NULL}};
|
||||
@@ -3103,7 +3103,7 @@ consvar_t cv_freecam_speed[MAXSPLITSCREENPLAYERS] = {
|
||||
{"freecam_speed", "1", CV_SAVE, freecam_speed_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"freecam2_speed", "1", CV_SAVE, freecam_speed_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"freecam3_speed", "1", CV_SAVE, freecam_speed_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"freecam4_speed", "1", CV_SAVE, freecam_speed_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"freecam4_speed", "1", CV_SAVE, freecam_speed_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}
|
||||
};
|
||||
|
||||
consvar_t cv_tilting = {"tilting", "Off", CV_SAVE|CV_CALL, CV_OnOff, Bird_menu_Onchange, 0, NULL, NULL, 0, 0, NULL};
|
||||
@@ -3113,7 +3113,13 @@ consvar_t cv_tiltsmoothing = {"tiltsmoothing", "32", CV_SAVE, CV_Natural, NULL,
|
||||
consvar_t cv_actionmovie = {"actionmovie", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
static CV_PossibleValue_t lookbackmom_cons_t[] = {{0, "Off"}, {1, "On"}, {2, "Double"}, {0, NULL}};
|
||||
consvar_t cv_lookbackmom = {"cameralookbackmom", "Off", CV_SAVE, lookbackmom_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
consvar_t cv_lookbackmom[MAXSPLITSCREENPLAYERS] = {
|
||||
{"cameralookbackmom", "Off", CV_SAVE, lookbackmom_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"cameralookbackmom2", "Off", CV_SAVE, lookbackmom_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"cameralookbackmom3", "Off", CV_SAVE, lookbackmom_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"cameralookbackmom4", "Off", CV_SAVE, lookbackmom_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}
|
||||
};
|
||||
|
||||
fixed_t t_cam_rotate[MAXSPLITSCREENPLAYERS] = {-42, -42, -42, -42};
|
||||
|
||||
@@ -4000,10 +4006,10 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
||||
// when looking back, camera's momentum
|
||||
// should inherit the momentum of the player
|
||||
// if value is 2, add extra
|
||||
if (cv_lookbackmom.value && lookback && lookbackdelay[num])
|
||||
if (cv_lookbackmom[num].value && lookback && lookbackdelay[num])
|
||||
{
|
||||
thiscam->momx += cv_lookbackmom.value*mo->momx;
|
||||
thiscam->momy += cv_lookbackmom.value*mo->momy;
|
||||
thiscam->momx += cv_lookbackmom[num].value*mo->momx;
|
||||
thiscam->momy += cv_lookbackmom[num].value*mo->momy;
|
||||
}
|
||||
|
||||
thiscam->momz = FixedMul(z - thiscam->z, camspeed/2);
|
||||
|
||||
+2
-2
@@ -1551,6 +1551,8 @@ void R_RegisterEngineStuff(void)
|
||||
CV_RegisterVar(&cv_cam_rotate[i]);
|
||||
CV_RegisterVar(&cv_cam_timeover[i]);
|
||||
CV_RegisterVar(&cv_freecam_speed[i]);
|
||||
|
||||
CV_RegisterVar(&cv_lookbackmom[i]);
|
||||
}
|
||||
|
||||
CV_RegisterVar(&cv_tilting);
|
||||
@@ -1558,8 +1560,6 @@ void R_RegisterEngineStuff(void)
|
||||
CV_RegisterVar(&cv_tiltsmoothing);
|
||||
CV_RegisterVar(&cv_actionmovie);
|
||||
|
||||
CV_RegisterVar(&cv_lookbackmom);
|
||||
|
||||
CV_RegisterVar(&cv_driftsparkpulse);
|
||||
CV_RegisterVar(&cv_gravstretch);
|
||||
CV_RegisterVar(&cv_sloperoll);
|
||||
|
||||
Reference in new issue
Block a user