From: Mario Date: Wed, 29 Jun 2022 12:42:56 +0000 (+1000) Subject: Remove a legacy hack to test cs_project breakage that predates Xonotic and is very... X-Git-Tag: xonotic-v0.8.6~436^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7b86c6c5151b33a7d47c450e3d56bcec95ed4bb1;p=xonotic%2Fxonotic-data.pk3dir.git Remove a legacy hack to test cs_project breakage that predates Xonotic and is very likely no longer necessary --- diff --git a/qcsrc/client/main.qh b/qcsrc/client/main.qh index 7be53f6de..a2b0fe31c 100644 --- a/qcsrc/client/main.qh +++ b/qcsrc/client/main.qh @@ -123,7 +123,6 @@ bool vote_waiting_for_me; float current_zoomfraction; -int cs_project_is_b0rked; int vid_width, vid_height; float vid_pixelheight; diff --git a/qcsrc/client/view.qc b/qcsrc/client/view.qc index 530324656..5f95d4f77 100644 --- a/qcsrc/client/view.qc +++ b/qcsrc/client/view.qc @@ -359,11 +359,6 @@ STATIC_INIT(viewmodel) { vector project_3d_to_2d(vector vec) { vec = cs_project(vec); - if(cs_project_is_b0rked > 0) - { - vec.x *= vid_conwidth / vid_width; - vec.y *= vid_conheight / vid_height; - } return vec; } @@ -1726,34 +1721,6 @@ void CSQC_UpdateView(entity this, float w, float h) NextFrameCommand = string_null; } - // we must do this check AFTER a frame was rendered, or it won't work - if(cs_project_is_b0rked == 0) - { - string w0, h0; - w0 = ftos(autocvar_vid_conwidth); - h0 = ftos(autocvar_vid_conheight); - //setproperty(VF_VIEWPORT, '0 0 0', '640 480 0'); - //setproperty(VF_FOV, '90 90 0'); - setproperty(VF_ORIGIN, '0 0 0'); - setproperty(VF_ANGLES, '0 0 0'); - setproperty(VF_PERSPECTIVE, 1); - vector forward, right, up; - MAKE_VECTORS('0 0 0', forward, right, up); - vector v1, v2; - cvar_set("vid_conwidth", "800"); - cvar_set("vid_conheight", "600"); - v1 = cs_project(forward); - cvar_set("vid_conwidth", "640"); - cvar_set("vid_conheight", "480"); - v2 = cs_project(forward); - if(v1 == v2) - cs_project_is_b0rked = 1; - else - cs_project_is_b0rked = -1; - cvar_set("vid_conwidth", w0); - cvar_set("vid_conheight", h0); - } - HUD_Mouse(local_player); cl_notice_run();