source-sdk-2013 icon indicating copy to clipboard operation
source-sdk-2013 copied to clipboard

[TF2] fix: scout balls computing critical hits incorrectly

Open mastercoms opened this issue 10 months ago • 1 comments

Scout balls were computing crits in their own entity think outside of the player command, which made the random generation invalid, since crit calcs are only valid during attacks. This caused random crits to be computed incorrectly, and also allowed for an exploit where you could store a random crit with the ball and permanently crit every ball thereafter.

Technically, you could seed more crit chances by using primary fire and rolling more crits before the ball actually launched in the think. However in practice, there is no way to influence the crit between the secondary attack command and the ball think running, because the primary attack time is delayed by 0.25 seconds, which is longer than the launch delay.

For safety, there's two approaches that could solve this:

  1. tf_scout_bat_launch_delay could be integrated into the primary attack delay,
  2. tf_scout_bat_launch_delay could get a max limit of 0.25 seconds to avoid setting it higher.

But I'm not sure if this is required (as any modifications to gameplay variables should come at the risk of the community server owner / modder). Regardless, I've added option 1 as an additional commit.

mastercoms avatar Feb 18 '25 23:02 mastercoms

This enables Scout a decent melee option other than the atomizer tbh. If they fix it, they should buff the wrap assassin at-least in some way (especially in the absence of the old sandman). Granted it was never useless, just underwhelming on its own.

SomeBloodyMinger avatar Feb 21 '25 05:02 SomeBloodyMinger