diff --git a/assets/vita/eboot.bin b/assets/vita/eboot.bin index ac63d24..858ddcc 100644 Binary files a/assets/vita/eboot.bin and b/assets/vita/eboot.bin differ diff --git a/source/gl_screen.c b/source/gl_screen.c index de32c8a..c765ed0 100644 --- a/source/gl_screen.c +++ b/source/gl_screen.c @@ -94,6 +94,7 @@ cvar_t scr_clock = {"scr_clock", "0", CVAR_NONE}; cvar_t scr_viewsize = {"viewsize","100", CVAR_ARCHIVE}; cvar_t scr_fov = {"fov","70",CVAR_NONE}; // 10 - 170 cvar_t scr_fov_adapt = {"fov_adapt","1",CVAR_ARCHIVE}; +cvar_t scr_dynamic_fov = {"scr_dynamic_fov","1",CVAR_ARCHIVE}; //sB add dynamic FOV toggle cvar_t scr_conspeed = {"scr_conspeed","500",CVAR_ARCHIVE}; cvar_t scr_centertime = {"scr_centertime","2",CVAR_NONE}; cvar_t scr_showram = {"showram","1",CVAR_NONE}; @@ -691,6 +692,7 @@ void SCR_Init (void) Cvar_SetCallback (&scr_viewsize, SCR_Callback_refdef); Cvar_RegisterVariable (&scr_fov); Cvar_RegisterVariable (&scr_fov_adapt); + Cvar_RegisterVariable (&scr_dynamic_fov); //sB add dynamic FOV toggle Cvar_RegisterVariable (&scr_viewsize); Cvar_RegisterVariable (&scr_conspeed); Cvar_RegisterVariable (&scr_showram); @@ -1693,8 +1695,16 @@ void SCR_UpdateScreen (void) if(!original_fov) original_fov = scr_fov.value; //original_fov = scr_fov.value; - scr_fov.value += (original_fov - 10 - scr_fov.value) * 0.3; - Cvar_SetValue("fov",scr_fov.value); + + if(scr_dynamic_fov.value == 0) //sB add dynamic FOV toggle + { + original_fov = 0; + } + else + { + scr_fov.value += (original_fov - 10 - scr_fov.value) * 0.3; + Cvar_SetValue("fov",scr_fov.value); + } } else if (cl.stats[STAT_ZOOM] == 0 && original_fov != 0) { diff --git a/source/menu.c b/source/menu.c index 44147e1..217a1fa 100644 --- a/source/menu.c +++ b/source/menu.c @@ -51,6 +51,7 @@ extern cvar_t in_aimassist; extern cvar_t joy_invert; extern cvar_t crosshair; extern cvar_t scr_showfps; +extern cvar_t scr_dynamic_fov; extern cvar_t host_maxfps; extern cvar_t r_fullbright; extern cvar_t gl_texturemode; @@ -2142,9 +2143,20 @@ void M_Graphics_Settings_Draw (void) Draw_ColoredStringScale(300, y + 160, "Disabled", 1, 1, 1, 1, 1.5f); else Draw_ColoredStringScale(300, y + 160, "Enabled", 1, 1, 1, 1, 1.5f); + + // Toggle Dynamic FOV + if (gsettings_cursor == 8) + Draw_ColoredStringScale(10, y + 175, "Dynamic FOV", 1, 0, 0, 1, 1.5f); + else + Draw_ColoredStringScale(10, y + 175, "Dynamic FOV", 1, 1, 1, 1, 1.5f); + + if (scr_dynamic_fov.value == 0) + Draw_ColoredStringScale(300, y + 175, "Disabled", 1, 1, 1, 1, 1.5f); + else + Draw_ColoredStringScale(300, y + 175, "Enabled", 1, 1, 1, 1, 1.5f); // Back - if (gsettings_cursor == 8) + if (gsettings_cursor == 9) Draw_ColoredStringScale(10, y + 335, "Back", 1, 0, 0, 1, 1.5f); else Draw_ColoredStringScale(10, y + 335, "Back", 1, 1, 1, 1, 1.5f); @@ -2157,6 +2169,7 @@ void M_Graphics_Settings_Draw (void) case 3: Draw_ColoredStringScale(10, y + 305, "Increase or Decrease Game Brightness.", 1, 1, 1, 1, 1.5f); break; case 6: Draw_ColoredStringScale(10, y + 305, "Toggle all non-realtime lights.", 1, 1, 1, 1, 1.5f); break; case 7: Draw_ColoredStringScale(10, y + 305, "Toggle texture filtering.", 1, 1, 1, 1, 1.5f); break; + case 8: Draw_ColoredStringScale(10, y + 305, "Toggle Dynamic FOV.", 1, 1, 1, 1, 1.5f); break; default: break; } } @@ -2170,7 +2183,8 @@ void M_Graphics_Settings_Key (int key) case 0: Cvar_SetValue("scr_showfps", scr_showfps.value ? 0 : 1); break; case 6: Cvar_SetValue("r_fullbright", r_fullbright.value ? 0 : 1); break; case 7: Cvar_Set("gl_texturemode", strcmp(gl_texturemode.string, "GL_LINEAR") ? "GL_LINEAR" : "GL_NEAREST_MIPMAP_LINEAR" ); break; - case 8: M_Menu_Options_f (); break; + case 8: Cvar_SetValue("scr_dynamic_fov", scr_dynamic_fov.value ? 0 : 1); break; + case 9: M_Menu_Options_f (); break; default: break; } break; diff --git a/source/view.c b/source/view.c index 9d9676c..45f7986 100644 --- a/source/view.c +++ b/source/view.c @@ -233,11 +233,11 @@ float V_CalcBob (float speed,float which)//0 = regular, 1 = side bobbing { float bob = 0; float sprint = 1; + if(cl.stats[STAT_ZOOM] == 3) sprint = 1.8 * speed_reduce (cl.stats[STAT_ACTIVEWEAPON]);//this gets sprinting speed in comparison to walk speed per weapon if(cl.stats[STAT_ZOOM] == 2) return 0; - //12.048 -> 4.3 = 100 -> 36ish, so replace 100 with 36 if(which == 0) bob = cl_bobup.value * 24 * speed * (sprint * sprint) * sin((cl.time * 12.5 * sprint));//Pitch Bobbing 10