X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;ds=sidebyside;f=skaterift.c;h=97f6553d7cb438a20d6a8680eb8f1033f63840a1;hb=d8fc0acce1b39466038284aa6f1941ebe98c8348;hp=21a7981793ba6ccd6149de3a5aaaccb483ecdf0d;hpb=b3b0d3d852f102147c6306f71818013e51e1687e;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/skaterift.c b/skaterift.c index 21a7981..97f6553 100644 --- a/skaterift.c +++ b/skaterift.c @@ -61,6 +61,14 @@ VG_STATIC void vg_preload(void) .persistent = 1 }); + vg_convar_push( (struct vg_convar){ + .name = "cl_fov", + .data = &g_fov_option, + .data_type = k_convar_dtype_f32, + .opt_f32 = { .clamp = 0 }, + .persistent = 1 + }); + vg_info(" Copyright . . . -----, ,----- ,---. .---. \n" ); vg_info(" 2021-2022 |\\ /| | / | | | | /| \n" ); vg_info(" | \\ / | +-- / +----- +---' | / | \n" ); @@ -94,7 +102,7 @@ VG_STATIC void vg_load(void) world_audio_init(); /* 'systems' are completely loaded now */ - strcpy( world.world_name, "models/mp_dev.mdl" ); + strcpy( world.world_name, "maps/mp_mtzero.mdl" ); world_load(); vg_console_load_autos(); } @@ -153,11 +161,12 @@ VG_STATIC void render_main_game(void) m4x4f world_4x4; m4x3_expand( camera_mtx_inverse, world_4x4 ); - static float fov = 97.0f; + static float fov = 60.0f; + + float fov_target = vg_lerpf( 90.0f, 110.0f, g_fov_option ); - float fov_target = 108.0f; if( player.phys.on_board ) - fov_target = 118.0f; + fov_target = vg_lerpf( 97.0f, 135.0f, g_fov_option ); if( cl_menu ) fov_target = menu_fov_target; @@ -259,6 +268,8 @@ VG_STATIC void vg_render(void) VG_STATIC void vg_ui(void) { + menu_crap_ui(); + #if 0 if( lightedit ) {