mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-18 07:22:28 +00:00
Changed defaults, camera settings save
Camera settings: distance from 128 to 160, height from 20 to 32, speed from 0.25 to 0.3 Mouse sensitivity from 35 to 12 Default control setup is Mystic's proposed scheme from the New Player Experiences topic (https://mb.srb2.org/showthread.php?t=42095) Also, camera settings now save to config, and they no longer try to reset back to the default at every chance it gets (you can die, start a new game, or exit, all while still keeping your preferred setting)
This commit is contained in:
parent
a979b425e0
commit
dbcbcf5da3
4 changed files with 31 additions and 31 deletions
10
src/g_game.c
10
src/g_game.c
|
@ -1565,11 +1565,12 @@ static void Analog_OnChange(void)
|
|||
return;
|
||||
|
||||
// cameras are not initialized at this point
|
||||
// Salt: Grooooaaan... I know that cameras aren't initalized yet and that analog needs a farther camera, but directly overwriting someone's settings should not be the way to do it!
|
||||
|
||||
if (leveltime > 1)
|
||||
/*if (leveltime > 1)
|
||||
CV_SetValue(&cv_cam_dist, 128);
|
||||
if (cv_analog.value || demoplayback)
|
||||
CV_SetValue(&cv_cam_dist, 192);
|
||||
CV_SetValue(&cv_cam_dist, 192);*/
|
||||
|
||||
if (!cv_chasecam.value && cv_analog.value) {
|
||||
CV_SetValue(&cv_analog, 0);
|
||||
|
@ -1590,11 +1591,12 @@ static void Analog2_OnChange(void)
|
|||
return;
|
||||
|
||||
// cameras are not initialized at this point
|
||||
// Salt: Grooooaaan... I know that cameras aren't initalized yet and that analog needs a farther camera, but directly overwriting someone's settings should not be the way to do it!
|
||||
|
||||
if (leveltime > 1)
|
||||
/*if (leveltime > 1)
|
||||
CV_SetValue(&cv_cam2_dist, 128);
|
||||
if (cv_analog2.value)
|
||||
CV_SetValue(&cv_cam2_dist, 192);
|
||||
CV_SetValue(&cv_cam2_dist, 192);*/
|
||||
|
||||
if (!cv_chasecam2.value && cv_analog2.value) {
|
||||
CV_SetValue(&cv_analog2, 0);
|
||||
|
|
|
@ -25,10 +25,10 @@ static CV_PossibleValue_t mousesens_cons_t[] = {{1, "MIN"}, {MAXMOUSESENSITIVITY
|
|||
static CV_PossibleValue_t onecontrolperkey_cons_t[] = {{1, "One"}, {2, "Several"}, {0, NULL}};
|
||||
|
||||
// mouse values are used once
|
||||
consvar_t cv_mousesens = {"mousesens", "35", CV_SAVE, mousesens_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_mousesens2 = {"mousesens2", "35", CV_SAVE, mousesens_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_mouseysens = {"mouseysens", "35", CV_SAVE, mousesens_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_mouseysens2 = {"mouseysens2", "35", CV_SAVE, mousesens_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_mousesens = {"mousesens", "12", CV_SAVE, mousesens_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_mousesens2 = {"mousesens2", "12", CV_SAVE, mousesens_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_mouseysens = {"mouseysens", "12", CV_SAVE, mousesens_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_mouseysens2 = {"mouseysens2", "12", CV_SAVE, mousesens_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_controlperkey = {"controlperkey", "One", CV_SAVE, onecontrolperkey_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
INT32 mousex, mousey;
|
||||
|
@ -1154,10 +1154,8 @@ void G_Controldefault(void)
|
|||
#else
|
||||
void G_Controldefault(void)
|
||||
{
|
||||
gamecontrol[gc_forward ][0] = KEY_UPARROW;
|
||||
gamecontrol[gc_forward ][1] = 'w';
|
||||
gamecontrol[gc_backward ][0] = KEY_DOWNARROW;
|
||||
gamecontrol[gc_backward ][1] = 's';
|
||||
gamecontrol[gc_forward ][0] = 'w';
|
||||
gamecontrol[gc_backward ][0] = 's';
|
||||
gamecontrol[gc_strafeleft ][0] = 'a';
|
||||
gamecontrol[gc_straferight][0] = 'd';
|
||||
gamecontrol[gc_turnleft ][0] = KEY_LEFTARROW;
|
||||
|
@ -1178,19 +1176,18 @@ void G_Controldefault(void)
|
|||
gamecontrol[gc_fire ][1] = KEY_MOUSE1+0;
|
||||
gamecontrol[gc_firenormal ][0] = 'c';
|
||||
gamecontrol[gc_tossflag ][0] = '\'';
|
||||
gamecontrol[gc_use ][0] = 'x';
|
||||
gamecontrol[gc_use ][0] = KEY_LSHIFT;
|
||||
gamecontrol[gc_camtoggle ][0] = 'v';
|
||||
gamecontrol[gc_camleft ][0] = '[';
|
||||
gamecontrol[gc_camright ][0] = ']';
|
||||
gamecontrol[gc_camreset ][0] = 'r';
|
||||
gamecontrol[gc_lookup ][0] = KEY_PGUP;
|
||||
gamecontrol[gc_lookdown ][0] = KEY_PGDN;
|
||||
gamecontrol[gc_lookup ][0] = KEY_UPARROW;
|
||||
gamecontrol[gc_lookdown ][0] = KEY_DOWNARROW;
|
||||
gamecontrol[gc_centerview ][0] = KEY_END;
|
||||
gamecontrol[gc_talkkey ][0] = 't';
|
||||
gamecontrol[gc_teamkey ][0] = 'y';
|
||||
gamecontrol[gc_scores ][0] = KEY_TAB;
|
||||
gamecontrol[gc_jump ][0] = 'z';
|
||||
gamecontrol[gc_jump ][1] = KEY_MOUSE1+1;
|
||||
gamecontrol[gc_jump ][0] = KEY_SPACE;
|
||||
gamecontrol[gc_console ][0] = KEY_CONSOLE;
|
||||
gamecontrol[gc_pause ][0] = KEY_PAUSE;
|
||||
#ifdef WMINPUT
|
||||
|
|
|
@ -2583,8 +2583,8 @@ boolean P_SetupLevel(boolean skipprecip)
|
|||
|
||||
if (!dedicated)
|
||||
{
|
||||
if (!cv_cam_speed.changed)
|
||||
CV_Set(&cv_cam_speed, cv_cam_speed.defaultvalue);
|
||||
//if (!cv_cam_speed.changed)
|
||||
//CV_Set(&cv_cam_speed, cv_cam_speed.defaultvalue);
|
||||
|
||||
if (!cv_chasecam.changed)
|
||||
CV_SetValue(&cv_chasecam, chase);
|
||||
|
@ -2881,7 +2881,8 @@ boolean P_SetupLevel(boolean skipprecip)
|
|||
}
|
||||
}
|
||||
|
||||
if (!cv_cam_height.changed)
|
||||
// Salt: I don't understand *why* it does this, but this overwrites the player's setting, even though it looks like it shouldn't do that unless if it's already the default
|
||||
/*if (!cv_cam_height.changed)
|
||||
CV_Set(&cv_cam_height, cv_cam_height.defaultvalue);
|
||||
|
||||
if (!cv_cam_dist.changed)
|
||||
|
@ -2897,7 +2898,7 @@ boolean P_SetupLevel(boolean skipprecip)
|
|||
CV_Set(&cv_cam2_dist, cv_cam2_dist.defaultvalue);
|
||||
|
||||
if (!cv_cam2_rotate.changed)
|
||||
CV_Set(&cv_cam2_rotate, cv_cam2_rotate.defaultvalue);
|
||||
CV_Set(&cv_cam2_rotate, cv_cam2_rotate.defaultvalue);*/
|
||||
|
||||
if (!cv_analog.changed)
|
||||
CV_SetValue(&cv_analog, 0);
|
||||
|
|
16
src/p_user.c
16
src/p_user.c
|
@ -8020,18 +8020,18 @@ static CV_PossibleValue_t CV_CamSpeed[] = {{0, "MIN"}, {1*FRACUNIT, "MAX"}, {0,
|
|||
static CV_PossibleValue_t rotation_cons_t[] = {{1, "MIN"}, {45, "MAX"}, {0, NULL}};
|
||||
static CV_PossibleValue_t CV_CamRotate[] = {{-720, "MIN"}, {720, "MAX"}, {0, NULL}};
|
||||
|
||||
consvar_t cv_cam_dist = {"cam_dist", "128", CV_FLOAT, NULL, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam_height = {"cam_height", "20", CV_FLOAT, NULL, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam_dist = {"cam_dist", "160", CV_FLOAT|CV_SAVE, NULL, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam_height = {"cam_height", "32", CV_FLOAT|CV_SAVE, NULL, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam_still = {"cam_still", "Off", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam_speed = {"cam_speed", "0.25", CV_FLOAT, CV_CamSpeed, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam_speed = {"cam_speed", "0.3", CV_FLOAT|CV_SAVE, CV_CamSpeed, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam_rotate = {"cam_rotate", "0", CV_CALL|CV_NOINIT, CV_CamRotate, CV_CamRotate_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam_rotspeed = {"cam_rotspeed", "10", 0, rotation_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam2_dist = {"cam2_dist", "128", CV_FLOAT, NULL, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam2_height = {"cam2_height", "20", CV_FLOAT, NULL, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam_rotspeed = {"cam_rotspeed", "10", CV_SAVE, rotation_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam2_dist = {"cam2_dist", "160", CV_FLOAT|CV_SAVE, NULL, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam2_height = {"cam2_height", "32", CV_FLOAT|CV_SAVE, NULL, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam2_still = {"cam2_still", "Off", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam2_speed = {"cam2_speed", "0.25", CV_FLOAT, CV_CamSpeed, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam2_speed = {"cam2_speed", "0.3", CV_FLOAT|CV_SAVE, CV_CamSpeed, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam2_rotate = {"cam2_rotate", "0", CV_CALL|CV_NOINIT, CV_CamRotate, CV_CamRotate2_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam2_rotspeed = {"cam2_rotspeed", "10", 0, rotation_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_cam2_rotspeed = {"cam2_rotspeed", "10", CV_SAVE, rotation_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
fixed_t t_cam_dist = -42;
|
||||
fixed_t t_cam_height = -42;
|
||||
|
|
Loading…
Reference in a new issue