Client: Fix for `buildcubemaps` angles being overriden by some entity in the map or other.

This commit is contained in:
Marco Cawthorne 2023-03-16 15:35:59 -07:00
parent 8950666c69
commit 9e6d6ee7f1
Signed by: eukara
GPG Key ID: CE2032F0A2882A22
3 changed files with 5 additions and 3 deletions

View File

@ -113,9 +113,9 @@ varying mat3 invsurface;
#endif
/* directional light */
light = (e_light_mul * lambert(norm, e_light_dir)) * 2.0;
light += (e_light_mul * lambert(norm, e_light_dir)) * 2.0;
light += (e_light_ambient * lambert(norm, reflect(norm, e_light_dir))) * 0.5;
light *= 2.0;
light += (e_light_mul * dot(normal_f, e_light_dir));
#ifdef FAKESHADOWS
diff_f.rgb *= ShadowmapFilter(s_shadowmap, vtexprojcoord);

View File

@ -205,6 +205,7 @@ CSQC_UpdateView(float w, float h, float focus)
{
NSClient cl = __NULL__;
int s;
vector vecViewAngles = view_angles;
g_focus = (bool)focus;
@ -260,7 +261,8 @@ CSQC_UpdateView(float w, float h, float focus)
setproperty(VF_MIN, [0,0]);
setproperty(VF_VIEWENTITY, player_localentnum);
setproperty(VF_ORIGIN, g_vecCubePos);
setproperty(VF_ANGLES, [0,0,0]);
setproperty(VF_ANGLES, vecViewAngles);
setproperty(VF_CL_VIEWANGLES, vecViewAngles);
setproperty(VF_SIZE_X, g_dCubeSize);
setproperty(VF_SIZE_Y, g_dCubeSize);
setproperty(VF_AFOV, 90.0f);