• Hey, guest user. Hope you're enjoying NeoGAF! Have you considered registering for an account? Come join us and add your take to the daily discourse.

'Team Fortress 2' patch fixes decade-old bug

Article link.

Video games with a dedicated developer team periodically release software patches to fix broken things. Sometimes these come at the behest of the title's community, and dedicated users can be counted on to pick apart janky or erratic flaws faster than developers can address them. Unless everyone misses something for, say, a decade. That's how long a particular bug had been in the shooter Team Fortress 2 -- since it was released in 2007 -- if a pair of modders are to believed, an issue that studio Valve finally fixed in yesterday's game update.

The phenomenon would've flown under history's radar if Reddit user sigsegv__ hadn't called attention to a particular fix nestled in this recent patch's unusually dense list of addressed issues. In a comment, sigsegv__ pointed out that he'd reported this bug to Valve after a developer of the TF2 Classic mod, Nicknine, first exposed the issue in a video a few weeks ago and claimed it had been in the game since its original release. sigsegv__ made his own video exploring its severity.

To explain the bug simply, if someone started the game as one of three particular classes and then shifted to any of the six others, their character would have one set of hitboxes and the server would register a slightly different one to other players. The mismatch between animated model and actual hittable zones means a decent amount of shots taken over the game's ten-year lifespan were likely near-misses when they should've been hits, assuaging the ego of anyone who swore they'd gotten that sweet headshot that one time.

Fixing it was as simple as changing one line of code, sigsegv__ claims in the Reddit comment, but knowing which line and where was the real trick. We've reached out to both modders and Valve, and will update when we know more about the bug. For now, rest easy that your shots are slightly more accurate and a long-overlooked wrong has been righted.

The reddit comment.
 

Bluth54

Member
This isn't the only bug like that sigsegv has found. He's very good at picking apart the code of TF2 and finding the cause of long standing bugs.

Apparently even a member of the TF2 team suggested he apply to Valve though he had to decline due to a medical issue he has.
 
sigsegv said:
This is a relatively huge bug that was discovered by Nicknine (of the TF2 Classic dev team) and subsequently reported by me. Basically, merely by changing class, pose parameters could get seriously screwed up, messing up how the hitboxes animate on the server side (which, in turn, messes up hit detection).

The bug has been in the game since it was first released in 2007. (Or in other words, this is literally a 10-year-old bug.) Read the video descriptions for a bit more info on it.

Demonstration on a listen server: https://www.youtube.com/watch?v=tfl8TYQ1pbE
Demonstration on a dedicated server: https://www.youtube.com/watch?v=CLnW4l7amaY

The human player models mostly just had messed up leg animations (but also issues with e.g. heads leaning the wrong way when moving), because only the move_x and move_ypose parameters got swapped. The MvM robot player models have, uh, slightly more different permutations of pose parameters, so the consequences there were much greater in many cases for them.

Robot demonstration #1: https://www.youtube.com/watch?v=Yf8NIwImkdE
Robot demonstration #2: https://www.youtube.com/watch?v=uF6aY-lsofI

I might post the email I sent in (which has some technical details about the bug) a little later.
Oh and it was basically a 1-line code fix. (But knowing which one line of code is missing, and where, is the difficult part, you might say.)

EDIT: I don't think I ever gave a really concise description of what the exact circumstances were that would trigger the bug, so here's a YouTube comment reply that I wrote up that sums it up fairly well:
If you joined a server and your first class chosen was scout/heavy/sniper, then any time later on that server when you were soldier/pyro/demo/engie/medic/spy, your server-side animations would be screwed up.
Conversely, if you joined a server and your first class chosen was soldier/pyro/demo/engie/medic/spy, then any time later on that server when you were scout/heavy/sniper, your server-side animations would be screwed up.
Switching classes and switching back wouldn't fix it; dying wouldn't fix it; going to spectator wouldn't fix it; etc.

Why those particular classes? It's because the player models for scout/heavy/sniper have their pose parameters listed in one order, while the player models for soldier/pyro/demo/engie/medic/spy have their pose parameters listed in a slightly different order (move_x and move_y swapped).

And it's also worth pointing out that in MvM, the bots re-use the same 22 player slots over and over: when a robot dies, that player is switched to spectator, and then when it's time for another robot to spawn, the player is switched back onto blue team and changed to the class that the new robot should be. So, in effect, different MvM robots are somewhat equivalent to a group of human players who die, change class, and then respawn; which means that they were also susceptible to the bug.

Dude's a hero. Pretty sure Valve offered him a job at one point, think he turned it down because of medical issues.
 
I am surprised it took this long and they were not profiling their hitboxs with actually model placement. Thankfully sigsegv exists...
and the objectively better TFC if anyone wants to play that instead

This is one of the first things you do in an online multiplayer game. It was a huge deal in CS: Source for so long... so them not looking at it here is confusing.
 

MKIL65

Member
This has been pretty evident for a while. Melee weapons are the most inconsistent thing in the game.

You hit someone, you hear the hitsound, but nothing happens.
 
This has been pretty evident for a while. Melee weapons are the most inconsistent thing in the game.

You hit someone, you hear the hitsound, but nothing happens.

That's unrelated to this issue. Melee uses a different mechanism altogether, only checking the player hull, rather than the hitscan hitboxes.
 

ramparter

Banned
I'm sure this would have been found and corrected faster if people played anything other than 2Fort.
I haven't touched TF2 for 3 years now and If I ever install it again, 2Fort will be the first map I jump into.

Anyway this patch totally explains my bad days in the game.
 

Bluth54

Member
That's unrelated to this issue. Melee uses a different mechanism altogether, only checking the player hull, rather than the hitscan hitboxes.

Yeah I think you would actually see the effects of this bug if you attacked someone with a hitscan weapon and it appeared to hit their character model (you would see blood appear on them) but they wouldn't actually take any damage.
 
I haven't touched TF2 for 3 years now and If I ever install it again, 2Fort will be the first map I jump into.

Anyway this patch totally explains my bad days in the game.

This is a pretty small issue, which is how it went unnoticed for so long. It would only really manifest if you were shooting at legs or playing Sniper.

I am surprised it took this long and they were not profiling their hitboxs with actually model placement. Thankfully sigsegv exists...
and the objectively better TFC if anyone wants to play that instead

This is one of the first things you do in an online multiplayer game. It was a huge deal in CS: Source for so long... so them not looking at it here is confusing.

TF2 > Quake TF > Fortress Forever >>>>> TFC

There's a reason TFC is deader than the rest.
 

BHK3

Banned
Yeah I think you would actually see the effects of this bug if you attacked someone with a hitscan weapon and it appeared to hit their character model (you would see blood appear on them) but they wouldn't actually take any damage.

There's a comment about that from Sig

In TF2, the blood decals are indeed drawn based on the client-side predicted location of the hitboxes. (In CS:GO, they actually made a change so that they're now server-side based.)What this means is that if the lag compensation algorithms in the game aren't matching things up 100% accurately, or if the client-side and server-side hitboxes don't match up for some other reason (reasons which could include this bug), then you might make a shot that hits an enemy's hitbox based on the client-side location of that hitbox, but misses that enemy's hitbox based on the server-side location of that hitbox. Because it was a hit as far as the client's concerned, it draws the blood decal. Because it was a miss as far as the server's concerned, the damage isn't registered.

So, in summary: yes, this is potentially one of the reasons why you might see things like blood decals, yet not have the damage register.
 
Yeah I think you would actually see the effects of this bug if you attacked someone with a hitscan weapon and it appeared to hit their character model (you would see blood appear on them) but they wouldn't actually take any damage.

This bug definitely has been responsible for some instances of this kinda stuff.

But as long as blood decals are client side and lag is a thing it will keep happening anyway.
 

Apt101

Member
Having played TF2 off and on for about eight years, it feels like certain bugs linger for so long people just get used to it - and don't even notice when it's eventually fixed, because it had been three or four years.
 
Fixing it was as simple as changing one line of code, sigsegv__ claims in the Reddit comment, but knowing which line and where was the real trick.

Software debugging in a nutshell. :/ At least this bug seemed easily reproducible, unlike some heisenbugs I've suffered.
 

Bluth54

Member
Having played TF2 off and on for about eight years, it feels like certain bugs linger for so long people just get used to it - and don't even notice when it's eventually fixed, because it had been three or four years.

Well TF2 does still have the "wallhack" bug where you can see character shadows through very thin walls - though to be fair that's probably a Source engine bug and if Valve could of easily fixed it they would have years ago.

They also fixed quantum crouching last year, which is another source engine bug that would allow you to get through certain walls and get under the map.
 

Bluth54

Member
That would only have been for the updates up to 2013 when they dropped the charge.

Well to be fair if Valve had decided to do updates for TF2 on consoles they would likely consolidate a bunch of PC updates into a single large update.
 
I still remember how the Pain Train sounded like a bottle for over two years.

The bug that still makes newer weapons default to Bottle sounds still exists. Well, not really a bug. More that whenever they copy and paste the code from multi-class melees, they forget to add sound effects, so it uses the default. The default for Demoman are the bottle sounds.
 

Nzyme32

Member
That would only have been for the updates up to 2013 when they dropped the charge.

Have they actually dropped the charge ort just adjusted it so that there are more freely available updates of a certain size before you have to pay? Sure I read something similar a while back
 

Samemind

Member
Oh my god, the implications of TF2 having a decade-old bug just dawned on me.

It's been (nearly) a decade since TF2 was released D:
 
I've seen blood splatter a few times in the past which felt like it only did 5 damage instead of lots more, as it would visually look to me. (tf2 isn't the only game i've seen this kind of thing happen, gears of war has it's faults too)

A nasty bug and quite amazed that it was not discovered for so long.
 

Firebrand

Member
Did the glitch with your guy making random "im underwater" sounds ever get fixed? I found that one amazing as it originated in Quake 2 I think and made it all the way to Team Fortress 2.
 

BigEmil

Junior Member
Is Bloodborne sustained by a hat economy?

. . . It probably could be, but TF2 has gone beyond that too.
Man I regret spending so much on TF2 hats and cards and weapons. I wonder if there's a way to find out how much money you spent on Steam
 
Man I regret spending so much on TF2 hats and cards and weapons. I wonder if there's a way to find out how much money you spent on Steam

There is but trust me, you don't wanna know. I wish I never looked at how much I spent in TF2 and Dota....
Thank God I've stopped spending money on both.
 

cftrooper

Member
Microsoft would have made a fortune with that number of updates on Xbox certification.

I remember still hoping they'd update the Xbox version many many years ago. I don't know why I actually expected something like that to happen. :(

Probably because Valve hinted at it in their blog but still
 
Top Bottom