18#define SLICKDETECT_STEPS_EPSILON 0.00001
30 && slickdetector_height > 0
35 bool slickdetected =
false;
37 slicksteps = 90 *
DEG2RAD / 2 ** slicksteps;
40 slickdetected = already_detected;
43 vector traceorigin = e.origin +
eZ * e.mins.z;
60 slickoffset.x =
sin(j) * slickrotate;
61 slickoffset.y =
cos(j) * slickrotate;
85 slickdetector_size.y = slickdetector_height;
88 for (
int i = 0; i <= 1; ++i)
90 float y_offset = (i == 0)
91 ? -slickdetector_size.y
101 return slickdetector_height;
115 string vangle_text = sprintf(_(
"%s°"),
ftos_decimals(vangle, 2));
118 vangle_text, vangle_height,
121 text_offset_top, text_offset_bottom);
130 static float jumpheight = 0, jumptime = 0;
133 if ((e.velocity.z <= 0) || onground || swimming ||
IS_DEAD(e) || !
IS_PLAYER(e))
142 jumpheight = jumpheight_new;
154 string jumpheight_text =
ftos_decimals(jumpheight * length_conversion_factor, length_decimals);
159 jumpheight_text, jumpheight_height,
163 text_offset_top, text_offset_bottom);
178 strafeeff_text, strafeeff_height,
181 text_offset_top, text_offset_bottom);
188 static float startspeed = 0, starttime = 0;
203 string startspeed_text =
ftos_decimals(startspeed * speed_conversion_factor, 2);
208 startspeed_text, startspeed_height,
212 text_offset_top, text_offset_bottom);
218 static float sonar_time = 0;
221 float sonar_ratio = strafe_ratio - sonar_start;
222 if (sonar_start != 1)
223 sonar_ratio /= 1 - sonar_start;
229 bool sonar_ready = (sonar_time == 0) || ((
time - sonar_time) >= sonar_interval);
240 if (sonarsound && (sonar_volume > 0))
257 else if (newsound != cursound)
266 sonarsound =
strzone(sonarsound);
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
Header file that describes the resource system.
#define drawfill(position, size, rgb, alpha, flag)
void StrafeHUD_DrawTextIndicator(string text, float height, vector color, float fadetime, float lasttime, vector pos, float offset_top, float offset_bottom)
float StrafeHUD_GetLengthUnitFactor(int length_unit)
string StrafeHUD_GetLengthUnit(int length_unit)
vector StrafeHUD_MixColors(vector color1, vector color2, float ratio)
string GetSpeedUnit(int speed_unit)
float GetSpeedUnitFactor(int speed_unit)
#define PHYS_INPUT_ANGLES(s)
const float DRAWFLAG_NORMAL
const float MOVE_NOMONSTERS
float Q3SURFACEFLAG_SLICK
float trace_dphitq3surfaceflags
int autocvar_hud_speed_unit
strcat(_("^F4Countdown stopped!"), "\n^BG", _("Teams are too unbalanced."))
float race_nextcheckpoint
float race_checkpointtime
string _Sound_fixpath(string base)
float autocvar_hud_panel_strafehud_slickdetector_range
float autocvar_hud_panel_strafehud_sonar_interval_start
float autocvar_hud_panel_strafehud_sonar_volume_exponent
float autocvar_hud_panel_strafehud_vangle_size
float autocvar_hud_panel_strafehud_jumpheight_fade
float autocvar_hud_panel_strafehud_sonar_pitch_start
vector autocvar_hud_panel_strafehud_jumpheight_color
float autocvar_hud_panel_strafehud_sonar_interval_exponent
float autocvar_hud_panel_strafehud_strafeefficiency_size
float autocvar_hud_panel_strafehud_sonar_pitch_exponent
vector autocvar_hud_panel_strafehud_vangle_pos
bool autocvar_hud_panel_strafehud_unit_show
bool autocvar_hud_panel_strafehud_jumpheight
float autocvar_hud_panel_strafehud_sonar_interval_range
vector autocvar_hud_panel_strafehud_startspeed_pos
bool autocvar_hud_panel_strafehud_startspeed
float autocvar_hud_panel_strafehud_sonar_volume_range
vector autocvar_hud_panel_strafehud_vangle_color
bool autocvar_hud_panel_strafehud_strafeefficiency
float autocvar_hud_panel_strafehud_startspeed_size
float autocvar_hud_panel_strafehud_slickdetector_height
float autocvar_hud_panel_strafehud_sonar_start
float autocvar_hud_panel_strafehud_slickdetector_alpha
int autocvar_hud_panel_strafehud_slickdetector_granularity
float autocvar_hud_panel_strafehud_jumpheight_min
vector autocvar_hud_panel_strafehud_slickdetector_color
bool autocvar_hud_panel_strafehud_slickdetector
vector autocvar_hud_panel_strafehud_strafeefficiency_pos
vector autocvar_hud_panel_strafehud_jumpheight_pos
string autocvar_hud_panel_strafehud_sonar_audio
float autocvar_hud_panel_strafehud_startspeed_fade
float autocvar_hud_panel_strafehud_sonar_pitch_range
bool autocvar_hud_panel_strafehud_sonar
float autocvar_hud_panel_strafehud_jumpheight_size
float autocvar_hud_panel_strafehud_sonar_volume_start
vector autocvar_hud_panel_strafehud_startspeed_color
bool autocvar_hud_panel_strafehud_vangle
ERASEABLE string ftos_decimals(float number, int decimals)
converts a number to a string with the indicated number of decimals