A Spycrab is an iconic animation bug for the Spy from Team Fortress 2. This bug was introduced since the game’s launch in 2007 and still exists today!
youtube
This post will cover on what causes this bug happen, how to fix it, and why it SHOULDN’T be fixed.
Debugging the Spycrab
First we need to know how do you become a Spycrab in TF2. To become a Spycrab the player have to pull out the disguise kit, crouch, look up, then start moving in any direction.
This give us a clue on what’s going on. The issue is related to looking around while crouching with the Spy’s disguise kit. We can take a look at how Valve setup the Spy’s animations since they provided the model sources in the Source SDK. Let’s take a look at spy_movement.qci since that’s where they handle all of the animations related to moving around. From this point I will refer the disguise kit as PDA since that’s what it called in the sources. Looking at the entry for Crouch_PDA and Crouch_Walk_PDA everything seems to be written correctly. Theres nothing wrong with the code itself
This means that the issue is coming from one of the animations itself. Lets load up the PDA crouch animations in SFM and compare with the normal stand up animations.
Everything looks fine however there’s something odd with the pda_aimmatrix_crouch_idle animation. It’s in a different pose entirely! To summarize what a aim matrix do, the animator put the character in various poses mimicking that the character is looking around. The game will take those poses and blend between them depending on what direction the player is looking. Generally you don’t want to stray way from the idle pose too much since it can cause potential problems when blending between various poses at once.
With closer inspection, it seems the pda_aimmatrix_crouch_idle animation is actually an early version of the spy’s knife aim matrix animation. Here’s both aim matrices side by side.
The Fix
Now knowing that the bug is created by accidentally exporting another aim matrix animation for the wrong weapon. The fix is actually very simple! Without touching the animation files itself. We can go into the spy_movement.qci and replace any mention of pda_aimmatrix_crouch_idle with pda_aimmatrix_idle and that’s it! Compiling spy_animations.qc and loading up TF2 we will see the Spycrab no longer works.
But should this bug really be fixed?
This is the part where I tell you that the Spycrab bug should never be fixed in TF2. Even though this bug was stemmed from a mistake and it’s pretty simple to fix. This bug should never be fixed purely because it’s very important for the game’s history and community. After this bug was discovered and popularized back in 2008. It spawns plenty of memes within the community and in-game references from community cosmetics and unusuals, an official rare taunt for the disguise kit, warpaints, and a poster from the map Carnival of Carnage a Halloween reskin of Doomsday.
Hopefully this post provide some interesting insight on how this iconic bug was created and the process of debugging animations in Source Engine!