void UpdateDamage()
{
// accumulate damage with each stat update
- float unaccounted_damage_new = getstati(STAT_DAMAGE_DEALT_TOTAL);
+ static float damage_total_prev = 0;
+ float damage_total = getstati(STAT_DAMAGE_DEALT_TOTAL);
+ float unaccounted_damage_new = COMPARE_INCREASING(damage_total, damage_total_prev);
+ damage_total_prev = damage_total;
+
static float damage_dealt_time_prev = 0;
float damage_dealt_time = getstatf(STAT_HIT_TIME);
if (damage_dealt_time != damage_dealt_time_prev)
// varying sound pitch
static float hitsound_time_prev = 0;
- if (COMPARE_INCREASING(time, hitsound_time_prev) > autocvar_cl_hitsound_antispam_time)
+ // HACK: the only way to get the arc to sound consistent with pitch shift is to ignore cl_hitsound_antispam_time
+ float arc_hack = activeweapon == WEP_ARC && autocvar_cl_hitsound >= 2;
+ if (arc_hack || COMPARE_INCREASING(time, hitsound_time_prev) > autocvar_cl_hitsound_antispam_time)
{
if (autocvar_cl_hitsound && unaccounted_damage)
{
float ok_ammo_charge, ok_ammo_chargepool;
ok_ammo_charge = getstatf(STAT_OK_AMMO_CHARGE);
- ok_ammo_chargepool = getstatf(STAT_OK_AMMO_CHARGEPOOl);
+ ok_ammo_chargepool = getstatf(STAT_OK_AMMO_CHARGEPOOL);
float vortex_charge, vortex_chargepool;
vortex_charge = getstatf(STAT_VORTEX_CHARGE);
CSQCPlayer_SetCamera();
-#ifdef COMPAT_XON050_ENGINE
- if(spectatee_status)
- myteam = GetPlayerColor(spectatee_status - 1);
- else
-#endif
- myteam = GetPlayerColor(player_localentnum - 1);
+ myteam = GetPlayerColor(player_localentnum - 1);
if(myteam != prev_myteam)
{
// ALWAYS Clear Current Scene First
clearscene();
-#ifdef WORKAROUND_XON010
- if(checkextension("DP_CSQC_ROTATEMOVES"))
- {
-#endif
+
setproperty(VF_ORIGIN, view_origin);
setproperty(VF_ANGLES, view_angles);
-#ifdef WORKAROUND_XON010
- }
-#endif
// FIXME engine bug? VF_SIZE and VF_MIN are not restored to sensible values by this
setproperty(VF_SIZE, vf_size);
scoreboard_active = HUD_WouldDrawScoreboard();
UpdateDamage();
- UpdateHitsound();
UpdateCrosshair();
+ UpdateHitsound();
if(NextFrameCommand)
{