void Hud_Dynamic_Frame()
{
vector ofs = '0 0 0';
- hud_scale = '1 1 0';
- hud_shift = '0 0 0';
if (autocvar_hud_dynamic_follow)
{
entity view = CSQCModel_server2csqc(player_localentnum - 1);
ofs.y = bound(-0.1, ofs.y, 0.1);
ofs.z = bound(-0.1, ofs.z, 0.1);
- hud_shift.x = ofs.y * vid_conwidth;
- hud_shift.y = ofs.z * vid_conheight;
- hud_shift.z = ofs.x;
+ hud_shift_current.x = ofs.y * vid_conwidth;
+ hud_shift_current.y = ofs.z * vid_conheight;
+ hud_shift_current.z = ofs.x;
- hud_scale.x = (1 + hud_shift.z);
- hud_scale.y = hud_scale.x;
+ hud_scale_current.x = (1 + hud_shift_current.z);
+ hud_scale_current.y = hud_scale_current.x;
}
if(autocvar_hud_dynamic_shake > 0)
if(hud_dynamic_shake_factor > 0)
{
- hud_shift.x += hud_dynamic_shake_realofs.x;
- hud_shift.y += hud_dynamic_shake_realofs.y;
+ hud_shift_current.x += hud_dynamic_shake_realofs.x;
+ hud_shift_current.y += hud_dynamic_shake_realofs.y;
}
}
hud_scale_center.x = 0.5 * vid_conwidth;
hud_scale_center.y = 0.5 * vid_conheight;
- hud_scale_current = hud_scale;
- hud_shift_current = hud_shift;
+ HUD_Scale_Disable();
}
void HUD_Main()
float cl_followmodel_time;
vector hud_scale;
-vector hud_scale_current;
+vector hud_scale_current = '1 1 0';
vector hud_shift;
-vector hud_shift_current;
+vector hud_shift_current = '0 0 0';
vector hud_scale_center;
float stringwidth_colors(string s, vector theSize);