A ten year-old Team Fortress 2 bug has been found and fixed

Videogames have bugs. This is a fact of life. Some are obvious and easy to squash, and others are a little trickier to nail down. And then there are bugs like the one Valve fixed yesterday in Team Fortress 2. According to this Engadget report, it was around for a full decade—since TF2 was released in 2007—before it was noticed last month by TF2 Classic developer Nicknine, and reported by Redditor sigsegv_. 

The bug occurred when a player selected the Scout, Heavy, or Sniper as their first class upon joining a server. After that, switching to Soldier, Pyro, Demo, Engineer, Medic, or Spy on the same server would leave their local and server-side animations slightly out of sync. It worked the other way as well: Beginning as Soldier, Pyro, Demo, Engineer, Medic, or Spy, and then switching to Scout, Heavy, or Sniper would have the same effect.   

It sounds harmless enough, but the practical impact was most definitely not. As you can see in the video, the mismatch between local and server-side hitboxes meant that shots that should have hit sometimes would not. And once it happened, players were stuck: Switching back and forth wouldn't clear the error, nor would dying or going to spectator mode.     

"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)," sigsegv_ explained. "And it's also worth pointing out that in MvM [Mann vs Machine], 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." 

It's not a huge bug, as evidenced by the fact that it went unnoticed for ten years, but that's also what makes it so notable now. TF2 is not your average ten-year-old game: It's still one of the top five games on Steam, with tens of thousands of people blasting away at each other 24 hours a day, and is supported by a very active modding community. Yet somehow, this bug, which impacts the game at its most fundamental level—did you shoot the guy or not?—has slipped through the cracks until now. In a way, it's almost a shame that Valve fixed it.   

The full list of changes included in the latest TF2 update is below.

  • Improved Steam Voice support for servers that have enabled it
  • Removed sv_use_steam_voice convar. Steam voice is now selected via "sv_voicecodec steam"
  • Fixed demos not properly recording Steam Voice status, resulting in potential corrupt voice in demos with differing default settings
  • Will now use the native Steam Voice sampling rate, instead of clamping to 11kHz
  • Improved compatibility with Steam client beta
  • Fixed OS X voice communication sounding high-pitched when using the default CELT voice codec
  • Fixed an animation bug that would cause the client and server hitboxes to become out of sync
  • Fixed the Scout not playing the correct animation when using the Shortstop's Alt-Fire to shove someone
  • Fixed some missing VO sounds for the Scout when he picks up a baseball
  • Fixed Spectators seeing the fake death notices for the Spy when he feigns death
  • Fixed the Widowmaker not doing increased damage when the Sentry's target is a building, boss, or tank
  • Fixed not earning Crikey meter progress with The Cleaner's Carbine when damaging a building, boss, or tank
  • Fixed the Scout not getting assists for shoving players while using the Shortstop
  • Fixed not being able to use non-tradable Giftapults
  • Fixed powerups sometimes being removed from the game in Mannpower mode
  • Fixed a case where the scoreboard would not update properly when players volunteer to switch teams in Casual mode
  • Fixed a case where Casual servers would spontaneously terminate with "Server shutting down" upon losing connection with the matchmaking service
  • Updated the logic used to pick the maps players can vote on in the end-of-match map vote on Casual servers to help maintain healthier game mode representation across regions
  • Casual servers were often rotating to unrelated game modes during votes, resulting in partially filled servers in certain regions
  • Updated the player_bodygroups that are hidden when equipping The Dark Falkirk Helm and The Sole Saviors
  • Updated the model/materials for The Snowmann to fix some LOD issues
  • Updated the localization files
  • Added Gift Wrap back to the Mann Co. Store at a reduced price
  • Added TF2Maps 72hr TF2Jam Winter Participant 2017 community medal
  • Added Rally Call Charity Tournament community medals
  • Added ozfortress Season 18 tournament medals
  • Added new survey questions to the end-of-match survey for Casual and Competitive modes and fixed a bug where multiple surveys could be displayed at the same time
TOPICS
Andy Chalk

Andy has been gaming on PCs from the very beginning, starting as a youngster with text adventures and primitive action games on a cassette-based TRS80. From there he graduated to the glory days of Sierra Online adventures and Microprose sims, ran a local BBS, learned how to build PCs, and developed a longstanding love of RPGs, immersive sims, and shooters. He began writing videogame news in 2007 for The Escapist and somehow managed to avoid getting fired until 2014, when he joined the storied ranks of PC Gamer. He covers all aspects of the industry, from new game announcements and patch notes to legal disputes, Twitch beefs, esports, and Henry Cavill. Lots of Henry Cavill.