Why its occasionally possible to outright kill Sentry Busters @sigsegv-mvm
Why its occasionally possible to outright kill Sentry Busters  @sigsegv-mvm
Uploaded January 2017 | Updated November 2026, 23 hours ago
You aren't supposed to be able to kill sentry busters; if you damage a buster enough to kill it, the game forces it to stay at 1 HP and starts its detonation sequence instead. But due to a bug, it IS possible to kill busters in rare cases; continue reading for more on the specifics.

The short version is this: if a sentry buster has X HP, and you do anywhere between approximately (X-0.001) and (X-0.500) damage to it (e.g. if it has 100 HP, that would mean anywhere between ~99.500 and ~99.999 damage), then the buster will lose 100 HP, be left with 0 HP, and therefore die; and the game will not intervene to keep it alive at 1 HP as it should.

The root of the problem involves the fact that entities in the Source engine (such as player entities, which includes sentry busters) store their current health value as an integer; whereas damage values in the Source engine are represented as floating-point numbers. (For non-programmers: essentially, floating-point numbers are simply numbers that aren't limited to just storing integer values; they can have fractional parts: stuff to the right of the decimal point, so to speak. But they have other tradeoffs, like precision limitations.)

When the game checks whether the damage would hypothetically be enough to kill the buster, what it actually does is it subtracts the damage amount from the bot's current health and checks whether the result is less than or equal to zero; naturally, if a player's health drops to 0 or less, then they have been killed. (Side note: the bot's HP value is implicitly converted from int to float for this comparison, but that's of no particular relevance and doesn't affect anything.)

The important thing to take away from the paragraph above is that the game is checking whether the health would drop below 0.000000 to determine whether the bot would die. But since HP values are stored as integers, when the damage is finally actually applied (by subtracting it from the bot's health), some sort of rounding MUST occur; and for fractional amounts of damage that are inflicted on players, Team Fortress 2 rounds to the nearest integer (e.g. if you do 149.7 damage to an enemy player, they will lose 150 HP).

Most damage amounts in TF2 are actually not whole numbers, even if your HUD damage text leads you to believe that they are. Factors like distance falloff and percentage-based damage multipliers/resistances will constantly result in damage amounts not being integral. And that's not inherently problematic.

But what IS problematic, is that in many cases (not just with sentry busters), the game does hypothetical comparisons like the one described earlier, which fail to properly account for the fact that you can't just subtract a damage value from an HP value and assume that a naked floating point comparison will result in an accurate prediction of the post-damage HP value.

Here's the exact location in the source code where TF2 explicitly rounds damage taken to the nearest integer prior to subtracting it from the player's health value: github.com/LestaD/SourceEngine2007/blob/master/src_main/game/server/tf/tf_player.cpp#L2838

^ That code is from the March 2008 leak; however, I've confirmed that the exact same methodology is still being used in the most recent TF2 version: http://i.cubeupload.com/reNlP9.png
Why its occasionally possible to outright kill Sentry BustersServer mod: custom engiebot AI behavior for WranglerMedic bot shields screw up bot pathingLazy engiebotsMod: enable bots to use Wrap Assassin alt-firePyro, get on the tank! IIThat pyro healing debuff thing added in MYM is very screwed upAttribute class airblast_dashesBugginess involving abandoned MvM engiebot buildingsServer mod: new/wacky canteen effectsFeign death ragdolls shriveling up: reliably reproducedMaking engiebots build regular sentries in weird spots
sigsegv |

Why it's occasionally possible to outright kill Sentry Busters

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER