float eventchase_current_distance;
float eventchase_running;
-int WantEventchase(entity this)
+int WantEventchase(entity this, bool want_vehiclechase)
{
if(autocvar_cl_orthoview)
return 0;
return 1;
if(spectatee_status >= 0)
{
- if(hud != HUD_NORMAL && (autocvar_cl_eventchase_vehicle || spectatee_status > 0))
+ if(want_vehiclechase)
return 1;
if(MUTATOR_CALLHOOK(WantEventchase, this))
return 1;
else if(autocvar_chase_active == -2)
cvar_set("chase_active", "0");
- float vehicle_chase = (hud != HUD_NORMAL && (autocvar_cl_eventchase_vehicle || spectatee_status > 0));
+ bool vehicle_chase = (hud != HUD_NORMAL && (autocvar_cl_eventchase_vehicle || spectatee_status > 0));
float vehicle_viewdist = 0;
vector vehicle_viewofs = '0 0 0';
Vehicle info = Vehicles_from(hud);
vehicle_viewdist = info.height;
vehicle_viewofs = info.view_ofs;
+ if(vehicle_viewdist < 0) // when set below 0, this vehicle doesn't use third person view (gunner slots)
+ vehicle_chase = false;
}
+ else
+ vehicle_chase = false;
}
- int eventchase = WantEventchase(this);
+ int eventchase = WantEventchase(this, vehicle_chase);
if (eventchase)
{
vector current_view_origin_override = '0 0 0';