From 8a84e8e554c781a59f7939341d1cd4fdd04bbcc1 Mon Sep 17 00:00:00 2001 From: Sandust60 <96904513+M60TM@users.noreply.github.com> Date: Sun, 4 Feb 2024 13:12:26 +0900 Subject: [PATCH] Fixed wrong classname in GetClassWeaponClassname (#167) [M] If the class is heavy, return it to "tf_weapon_fireaxe" instead of "tf_weapon_fists". I don't know when it changed. --- .../scripting/ff2r_default_abilities.sp | 17 ++++++++--------- .../scripting/freak_fortress_2/stocks.sp | 17 ++++++++--------- 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/addons/sourcemod/scripting/ff2r_default_abilities.sp b/addons/sourcemod/scripting/ff2r_default_abilities.sp index e34da80..d4a01fe 100644 --- a/addons/sourcemod/scripting/ff2r_default_abilities.sp +++ b/addons/sourcemod/scripting/ff2r_default_abilities.sp @@ -3469,15 +3469,14 @@ void GetClassWeaponClassname(TFClassType class, char[] name, int length) { switch(class) { - case TFClass_Scout: strcopy(name, length, "tf_weapon_bat"); - case TFClass_Pyro: strcopy(name, length, "tf_weapon_fireaxe"); - case TFClass_DemoMan: strcopy(name, length, "tf_weapon_bottle"); - case TFClass_Heavy: strcopy(name, length, "tf_weapon_fists"); - case TFClass_Engineer: strcopy(name, length, "tf_weapon_wrench"); - case TFClass_Medic: strcopy(name, length, "tf_weapon_bonesaw"); - case TFClass_Sniper: strcopy(name, length, "tf_weapon_club"); - case TFClass_Spy: strcopy(name, length, "tf_weapon_knife"); - default: strcopy(name, length, "tf_weapon_shovel"); + case TFClass_Scout: strcopy(name, length, "tf_weapon_bat"); + case TFClass_Pyro, TFClass_Heavy: strcopy(name, length, "tf_weapon_fireaxe"); + case TFClass_DemoMan: strcopy(name, length, "tf_weapon_bottle"); + case TFClass_Engineer: strcopy(name, length, "tf_weapon_wrench"); + case TFClass_Medic: strcopy(name, length, "tf_weapon_bonesaw"); + case TFClass_Sniper: strcopy(name, length, "tf_weapon_club"); + case TFClass_Spy: strcopy(name, length, "tf_weapon_knife"); + default: strcopy(name, length, "tf_weapon_shovel"); } } else if(StrEqual(name, "tf_weapon_shotgun")) diff --git a/addons/sourcemod/scripting/freak_fortress_2/stocks.sp b/addons/sourcemod/scripting/freak_fortress_2/stocks.sp index 9ca9a00..4e43cf8 100644 --- a/addons/sourcemod/scripting/freak_fortress_2/stocks.sp +++ b/addons/sourcemod/scripting/freak_fortress_2/stocks.sp @@ -110,15 +110,14 @@ void GetClassWeaponClassname(TFClassType class, char[] name, int length) { switch(class) { - case TFClass_Scout: strcopy(name, length, "tf_weapon_bat"); - case TFClass_Pyro: strcopy(name, length, "tf_weapon_fireaxe"); - case TFClass_DemoMan: strcopy(name, length, "tf_weapon_bottle"); - case TFClass_Heavy: strcopy(name, length, "tf_weapon_fists"); - case TFClass_Engineer: strcopy(name, length, "tf_weapon_wrench"); - case TFClass_Medic: strcopy(name, length, "tf_weapon_bonesaw"); - case TFClass_Sniper: strcopy(name, length, "tf_weapon_club"); - case TFClass_Spy: strcopy(name, length, "tf_weapon_knife"); - default: strcopy(name, length, "tf_weapon_shovel"); + case TFClass_Scout: strcopy(name, length, "tf_weapon_bat"); + case TFClass_Pyro, TFClass_Heavy: strcopy(name, length, "tf_weapon_fireaxe"); + case TFClass_DemoMan: strcopy(name, length, "tf_weapon_bottle"); + case TFClass_Engineer: strcopy(name, length, "tf_weapon_wrench"); + case TFClass_Medic: strcopy(name, length, "tf_weapon_bonesaw"); + case TFClass_Sniper: strcopy(name, length, "tf_weapon_club"); + case TFClass_Spy: strcopy(name, length, "tf_weapon_knife"); + default: strcopy(name, length, "tf_weapon_shovel"); } } else if(StrEqual(name, "tf_weapon_shotgun"))