mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-31 05:30:48 +00:00
Merge branch 'f12fix' into 'master'
Fix F12 issues Closes #356 and #377 See merge request STJr/SRB2Internal!616
This commit is contained in:
commit
201cdef381
3 changed files with 14 additions and 17 deletions
16
src/m_menu.c
16
src/m_menu.c
|
@ -1174,11 +1174,11 @@ static menuitem_t OP_CameraOptionsMenu[] =
|
|||
{IT_STRING | IT_CVAR, NULL, "Third-person Camera" , &cv_chasecam , 10},
|
||||
{IT_STRING | IT_CVAR, NULL, "Flip Camera with Gravity" , &cv_flipcam , 20},
|
||||
{IT_STRING | IT_CVAR, NULL, "Orbital Looking" , &cv_cam_orbit , 30},
|
||||
{IT_STRING | IT_CVAR, NULL, "Downhill Slope Adjustment", &cv_cam_adjust, 40},
|
||||
{IT_STRING | IT_CVAR, NULL, "Downhill Slope Adjustment", &cv_cam_adjust, 40},
|
||||
|
||||
{IT_STRING | IT_CVAR | IT_CV_INTEGERSTEP, NULL, "Camera Distance", &cv_cam_dist, 60},
|
||||
{IT_STRING | IT_CVAR | IT_CV_INTEGERSTEP, NULL, "Camera Height", &cv_cam_height, 70},
|
||||
{IT_STRING | IT_CVAR | IT_CV_FLOATSLIDER, NULL, "Camera Speed", &cv_cam_speed, 80},
|
||||
{IT_STRING | IT_CVAR | IT_CV_INTEGERSTEP, NULL, "Camera Distance", &cv_cam_dist, 60},
|
||||
{IT_STRING | IT_CVAR | IT_CV_INTEGERSTEP, NULL, "Camera Height", &cv_cam_height, 70},
|
||||
{IT_STRING | IT_CVAR | IT_CV_FLOATSLIDER, NULL, "Camera Speed", &cv_cam_speed, 80},
|
||||
|
||||
{IT_STRING | IT_CVAR, NULL, "Crosshair", &cv_crosshair, 100},
|
||||
};
|
||||
|
@ -1188,11 +1188,11 @@ static menuitem_t OP_Camera2OptionsMenu[] =
|
|||
{IT_STRING | IT_CVAR, NULL, "Third-person Camera" , &cv_chasecam2 , 10},
|
||||
{IT_STRING | IT_CVAR, NULL, "Flip Camera with Gravity" , &cv_flipcam2 , 20},
|
||||
{IT_STRING | IT_CVAR, NULL, "Orbital Looking" , &cv_cam2_orbit , 30},
|
||||
{IT_STRING | IT_CVAR, NULL, "Downhill Slope Adjustment", &cv_cam2_adjust, 40},
|
||||
{IT_STRING | IT_CVAR, NULL, "Downhill Slope Adjustment", &cv_cam2_adjust, 40},
|
||||
|
||||
{IT_STRING | IT_CVAR | IT_CV_INTEGERSTEP, NULL, "Camera Distance", &cv_cam2_dist, 60},
|
||||
{IT_STRING | IT_CVAR | IT_CV_INTEGERSTEP, NULL, "Camera Height", &cv_cam2_height, 70},
|
||||
{IT_STRING | IT_CVAR | IT_CV_FLOATSLIDER, NULL, "Camera Speed", &cv_cam2_speed, 80},
|
||||
{IT_STRING | IT_CVAR | IT_CV_INTEGERSTEP, NULL, "Camera Distance", &cv_cam2_dist, 60},
|
||||
{IT_STRING | IT_CVAR | IT_CV_INTEGERSTEP, NULL, "Camera Height", &cv_cam2_height, 70},
|
||||
{IT_STRING | IT_CVAR | IT_CV_FLOATSLIDER, NULL, "Camera Speed", &cv_cam2_speed, 80},
|
||||
|
||||
{IT_STRING | IT_CVAR, NULL, "Crosshair", &cv_crosshair2, 100},
|
||||
};
|
||||
|
|
|
@ -255,8 +255,8 @@ boolean M_CanShowLevelInList(INT32 mapnum, INT32 gt);
|
|||
#define IT_CV_NOPRINT 1536
|
||||
#define IT_CV_NOMOD 2048
|
||||
#define IT_CV_INVISSLIDER 2560
|
||||
#define IT_CV_INTEGERSTEP 4096 // if IT_CV_NORMAL and cvar is CV_FLOAT, modify it by 1 instead of 0.0625
|
||||
#define IT_CV_FLOATSLIDER 4608 // IT_CV_SLIDER, value modified by 0.0625 instead of 1 (for CV_FLOAT cvars)
|
||||
#define IT_CV_INTEGERSTEP 4096 // if IT_CV_NORMAL and cvar is CV_FLOAT, modify it by 1 instead of 0.0625
|
||||
#define IT_CV_FLOATSLIDER 4608 // IT_CV_SLIDER, value modified by 0.0625 instead of 1 (for CV_FLOAT cvars)
|
||||
|
||||
//call/submenu specific
|
||||
// There used to be a lot more here but ...
|
||||
|
|
11
src/p_mobj.c
11
src/p_mobj.c
|
@ -3790,10 +3790,7 @@ boolean P_CameraThinker(player_t *player, camera_t *thiscam, boolean resetcalled
|
|||
dummy.z = thiscam->z;
|
||||
dummy.height = thiscam->height;
|
||||
if (!resetcalled && !(player->pflags & PF_NOCLIP) && !P_CheckSight(&dummy, player->mo)) // TODO: "P_CheckCameraSight" instead.
|
||||
{
|
||||
P_ResetCamera(player, thiscam);
|
||||
resetcalled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
fixed_t camspeed = P_AproxDistance(thiscam->momx, thiscam->momy);
|
||||
|
@ -3801,10 +3798,10 @@ boolean P_CameraThinker(player_t *player, camera_t *thiscam, boolean resetcalled
|
|||
P_SlideCameraMove(thiscam);
|
||||
|
||||
if (!resetcalled && P_AproxDistance(thiscam->momx, thiscam->momy) == camspeed)
|
||||
{
|
||||
P_ResetCamera(player, thiscam);
|
||||
resetcalled = true;
|
||||
}
|
||||
{
|
||||
P_ResetCamera(player, thiscam);
|
||||
resetcalled = true;
|
||||
}
|
||||
}
|
||||
if (resetcalled) // Okay this means the camera is fully reset.
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue