this.viewmodel_angles = this.angles;
}
anim_update(this);
- if (!this.animstate_override)
+ if (!this.animstate_override && !this.animstate_looping)
anim_set(this, this.anim_idle, true, false, false);
}
float f = 0; // 0..1; 0: fully active
return true;
if(MUTATOR_CALLHOOK(WantEventchase, this))
return true;
- if(autocvar_cl_eventchase_nexball && gametype == MAPINFO_TYPE_NEXBALL && !(WepSet_GetFromStat() & WEPSET(NEXBALL)))
- return true;
if(autocvar_cl_eventchase_death && (STAT(HEALTH) <= 0))
{
if(autocvar_cl_eventchase_death == 2)
return false;
}
-void HUD_Crosshair_Vehicle()
+void HUD_Crosshair_Vehicle(entity this)
{
if(hud != HUD_BUMBLEBEE_GUN)
{
Vehicle info = Vehicles_from(hud);
- info.vr_crosshair(info);
+ info.vr_crosshair(info, this);
}
}
{
case 1: // crosshair_color_per_weapon
{
- if(this)
+ if(this != WEP_Null)
{
wcross_color = this.wpcolor;
break;
return wcross_color;
}
-void HUD_Crosshair()
-{SELFPARAM();
- entity e = this;
+void HUD_Crosshair(entity this)
+{
float f, i, j;
vector v;
if(!scoreboard_active && !camera_active && intermission != 2 &&
if (hud != HUD_NORMAL)
{
- HUD_Crosshair_Vehicle();
+ HUD_Crosshair_Vehicle(this);
return;
}
string wcross_name = "";
float wcross_scale, wcross_blur;
+ entity e = WEP_Null;
if(autocvar_crosshair_per_weapon || (autocvar_crosshair_color_special == 1))
{
e = switchingweapon;
}
}
-void HUD_Draw()
+void HUD_Draw(entity this)
{
+ if(!intermission)
if (MUTATOR_CALLHOOK(HUD_Draw_overlay))
{
- drawfill('0 0 0', eX * vid_conwidth + eY * vid_conheight, MUTATOR_ARGV(0, vector), autocvar_hud_colorflash_alpha * MUTATOR_ARGV(0, float), DRAWFLAG_ADDITIVE);
+ drawfill('0 0 0', eX * vid_conwidth + eY * vid_conheight, M_ARGV(0, vector), autocvar_hud_colorflash_alpha * M_ARGV(1, float), DRAWFLAG_ADDITIVE);
}
else if(STAT(FROZEN))
{
// crosshair goes VERY LAST
UpdateDamage();
- HUD_Crosshair();
+ HUD_Crosshair(this);
HitSound();
}
float vh_notice_time;
void WaypointSprite_Load();
void CSQC_UpdateView(float w, float h)
-{SELFPARAM();
+{
+ SELFPARAM(); // needed for engine functions
TC(int, w); TC(int, h);
entity e;
float fov;
else
view_quality = 1;
+ // this needs to be updated manually now due to the destruction of engine physics stats
+ if(!isdemo() && autocvar_slowmo != STAT(MOVEVARS_TIMESCALE))
+ cvar_set("slowmo", ftos(STAT(MOVEVARS_TIMESCALE)));
+
button_attack2 = PHYS_INPUT_BUTTON_ATCK2(this);
button_zoom = PHYS_INPUT_BUTTON_ZOOM(this);
scoreboard_active = HUD_WouldDrawScoreboard();
- HUD_Draw();
+ HUD_Draw(this); // this parameter for deep vehicle function
if(NextFrameCommand)
{