As suggested by psychonic, I created an enum with a correct mapping of the TF2 weapon slots, based on empirical testing. It is intended to be used in place of the existing TFWeaponSlot values.
PHP Code:
enum
{
TFRealWeaponSlot_Primary,
TFRealWeaponSlot_Secondary,
TFRealWeaponSlot_Sapper = 1,
TFRealWeaponSlot_Melee,
TFRealWeaponSlot_PDA,
TFRealWeaponSlot_BuildTool = 3,
TFRealWeaponSlot_DisguiseKit = 3,
TFRealWeaponSlot_PDA2,
TFRealWeaponSlot_DestroyTool = 4,
TFRealWeaponSlot_CloakingDevice = 4,
TFRealWeaponSlot_EngineerBuilder
};
As you can see, I included aliases for PDA and PDA2 to make them easier to use. Also note that a Spy's revolver is in the Primary slot despite being a secondary item in the schema.
EngineerBuilder is used by an invisible item with item index 28 that allows the Engineer to build his various buildings... the BuildTool and DestroyTool alone are not enough and will not work if the Engy doesn't have an item index 28.
__________________