seta cl_hitsound 1 "play a hit notifier sound when you have hit an enemy"
set cl_hitsound_antispam_time 0.05 "don't play the hitsound more often than this"
-seta cl_chase_death 1 "camera goes into 3rd person mode when dead"
-seta cl_chase_intermission 1 "camera goes into 3rd person mode at match end"
-seta cl_chase_distance 140 "final distance of the chase camera"
-seta cl_chase_speed 1.3 "how fast the chase camera slides back, 0 is instant"
+seta cl_eventchase_death 1 "camera goes into 3rd person mode when dead"
+seta cl_eventchase_intermission 1 "camera goes into 3rd person mode when the match ends"
+seta cl_eventchase_distance 140 "final camera distance"
+seta cl_eventchase_speed 1.3 "how fast the camera slides back, 0 is instant"
//nifreks lockonrestart feature, used in team-based game modes, if set to 1 and all players readied up no other player can then join the game anymore, useful to block spectators from joining
set teamplay_lockonrestart 0 "it set to 1 in a team-based game, the teams are locked once all players readied up and the game restarted (no new players can join after restart unless using the server-command unlockteams)"
freeze_input_angles = input_angles;
// event chase camera
- if(spectatee_status >= 0 && (autocvar_cl_chase_death || autocvar_cl_chase_intermission))
+ if(spectatee_status >= 0 && (autocvar_cl_eventchase_death || autocvar_cl_eventchase_intermission))
if(autocvar_chase_active <= 0) // greater than 0 means it's enabled manually
{
- if((autocvar_cl_chase_death && getstati(STAT_HEALTH) <= 0 && !intermission) || (autocvar_cl_chase_intermission && intermission))
+ if((autocvar_cl_eventchase_death && getstati(STAT_HEALTH) <= 0 && !intermission) || (autocvar_cl_eventchase_intermission && intermission))
{
// We must enable chase_active to get a third person view (weapon viewmodel hidden and own player model showing).
// Ideally, there should be another way to enable third person cameras, such as through R_SetView()
cvar_set("chase_active", "-1"); // -1 enables chase_active while marking it as set by this code, and not by the user (which would be 1)
// make the camera smooth back
- if(autocvar_cl_chase_speed && chase_current_distance < autocvar_cl_chase_distance)
- chase_current_distance += autocvar_cl_chase_speed * (autocvar_cl_chase_distance - chase_current_distance) * frametime; // slow down the further we get
- else if(chase_current_distance != autocvar_cl_chase_distance)
- chase_current_distance = autocvar_cl_chase_distance;
+ if(autocvar_cl_eventchase_speed && chase_current_distance < autocvar_cl_eventchase_distance)
+ chase_current_distance += autocvar_cl_eventchase_speed * (autocvar_cl_eventchase_distance - chase_current_distance) * frametime; // slow down the further we get
+ else if(chase_current_distance != autocvar_cl_eventchase_distance)
+ chase_current_distance = autocvar_cl_eventchase_distance;
makevectors(view_angles);
// pass 1, used to check where the camera would go and obtain the trace_fraction
}
// Render the Scene
- if(!intermission || !view_set || (intermission && autocvar_cl_chase_intermission))
+ if(!intermission || !view_set || (intermission && autocvar_cl_eventchase_intermission))
{
view_origin = pmove_org + vo;
view_angles = input_angles;
float autocvar_crosshair_color_by_health;
float autocvar_cl_hitsound;
float autocvar_cl_hitsound_antispam_time;
-float autocvar_cl_chase_death;
-float autocvar_cl_chase_intermission;
-float autocvar_cl_chase_distance;
-float autocvar_cl_chase_speed;
+float autocvar_cl_eventchase_death;
+float autocvar_cl_eventchase_intermission;
+float autocvar_cl_eventchase_distance;
+float autocvar_cl_eventchase_speed;