diff --git a/plugins/tf2item_cosmetics.smx b/plugins/tf2item_cosmetics.smx index ae8d217..77d5c59 100644 Binary files a/plugins/tf2item_cosmetics.smx and b/plugins/tf2item_cosmetics.smx differ diff --git a/plugins/tf2item_weapons.smx b/plugins/tf2item_weapons.smx index ffc7bc5..7b4b641 100644 Binary files a/plugins/tf2item_weapons.smx and b/plugins/tf2item_weapons.smx differ diff --git a/scripting/tf2item_cosmetics.sp b/scripting/tf2item_cosmetics.sp index 15238b4..3021a29 100644 --- a/scripting/tf2item_cosmetics.sp +++ b/scripting/tf2item_cosmetics.sp @@ -3,7 +3,7 @@ #pragma semicolon 1 #pragma newdecls required -#define PLUGIN_VERSION "3.0.1" +#define PLUGIN_VERSION "3.0.2" public Plugin myinfo = { @@ -456,7 +456,7 @@ void IntermediaryMenu(int client, int iItemDefinitionIndex, int slot) { intMenu.AddItem(slotStr, "", ITEMDRAW_IGNORE); int anyMatch = 0; - if (IsHatUnusual(iItemDefinitionIndex && CV_Cosmetics_Unusuals.BoolValue)) { + if (IsHatUnusual(iItemDefinitionIndex) && CV_Cosmetics_Unusuals.BoolValue) { int effect = pCosmetics[client].uEffects[slot]; if (effect < 1 || pCosmetics[client].iItemIndex[slot] != iItemDefinitionIndex) diff --git a/scripting/tf2item_weapons.sp b/scripting/tf2item_weapons.sp index eb2187b..b1dda2e 100644 --- a/scripting/tf2item_weapons.sp +++ b/scripting/tf2item_weapons.sp @@ -3,7 +3,7 @@ #pragma semicolon 1 #pragma newdecls required -#define PLUGIN_VERSION "3.0.1" +#define PLUGIN_VERSION "3.0.2" public Plugin myinfo = { @@ -110,6 +110,10 @@ public void OnMapStart() { HookRespawns(); } +public void OnClientPostAdminCheck(int client) { + pWeapons[client].ResetAll(true); +} + // // Normal Menus Handlers //////////////////////// diff --git a/scripting/tf2items/tf2item_base.inc b/scripting/tf2items/tf2item_base.inc index fabd11f..a909f5c 100644 --- a/scripting/tf2items/tf2item_base.inc +++ b/scripting/tf2items/tf2item_base.inc @@ -12,6 +12,12 @@ /* * Change-Log * + * 3.0.2 - 14/10/21 + * tf2item_weapons + * - Fixed a wrongly initialized value for connecting players causing them to recieve a stock bat regardless of class. + * tf2item_cosmetics + * - Fixed Unusual overrides not being added to the menu regardless of ConVar value (parenthesis mistake) + * * 3.0.1 - 13/10/21 * * General diff --git a/scripting/tf2items/weapons.sp b/scripting/tf2items/weapons.sp index 3f5b431..cfaed36 100644 --- a/scripting/tf2items/weapons.sp +++ b/scripting/tf2items/weapons.sp @@ -129,9 +129,9 @@ enum struct WeaponsInfo { * void ResetAll() * Called to reset everything on the weapon. All is set to -1. */ - void ResetAll() { + void ResetAll(bool all = false) { for (int i = 0; i < 3; i++) - this.ResetFor(i); + this.ResetFor(i, all); } void ResetFor(int slot, bool resetAll = false) { @@ -149,6 +149,7 @@ enum struct WeaponsInfo { this.kSheen[slot] = -1; this.kStreaker[slot] = -1; + // Spells are set to 0 bc it's a bitfield this.sSpells[slot] = 0; // Do not reset the override if not needed. diff --git a/translations/paintkits.txt b/translations/paintkits.txt index 1884960..ca76c5a 100644 --- a/translations/paintkits.txt +++ b/translations/paintkits.txt @@ -1,19 +1,13 @@ "9_0_field { field_number: 2 }" "Red Rock Roscoe" - "9_100_field { field_number: 2 }" "100: (Unused) Red Rock Roscoe" - "9_101_field { field_number: 2 }" "101: (Unused) Sand Cannon" "9_102_field { field_number: 2 }" "Wrapped Reviver Mk.II" - "9_103_field { field_number: 2 }" "103: (Unused) Psychedelic Slugger" "9_104_field { field_number: 2 }" "Carpet Bomber Mk.II" "9_105_field { field_number: 2 }" "Masked Mender Mk.II" "9_106_field { field_number: 2 }" "Woodland Warrior Mk.II" - "9_107_field { field_number: 2 }" "107: (Unused) Purple Range" - "9_108_field { field_number: 2 }" "108: (Unused) Sudden Flurry" "9_109_field { field_number: 2 }" "Forest Fire Mk.II" "9_10_field { field_number: 2 }" "King of the Jungle" "9_112_field { field_number: 2 }" "Backwoods Boomstick Mk.II" "9_113_field { field_number: 2 }" "Woodsy Widowmaker Mk.II" "9_114_field { field_number: 2 }" "Night Owl Mk.II" - "9_117_field { field_number: 2 }" "117: (Unused) Barn Burner" "9_11_field { field_number: 2 }" "Night Terror" "9_120_field { field_number: 2 }" "Iron Wood Mk.II" "9_122_field { field_number: 2 }" "Plaid Potshotter Mk.II" @@ -23,8 +17,6 @@ "9_13_field { field_number: 2 }" "Woodsy Widowmaker" "9_143_field { field_number: 2 }" "Smalltown Bringdown Mk.II" "9_144_field { field_number: 2 }" "Civic Duty Mk.II" - "9_145_field { field_number: 2 }" "145: (Unused) Liquid Asset" - "9_148_field { field_number: 2 }" "148: (Unused) Pink Elephant" "9_14_field { field_number: 2 }" "Night Owl" "9_151_field { field_number: 2 }" "Dead Reckoner Mk.II" "9_15_field { field_number: 2 }" "Tartan Torpedo" @@ -120,7 +112,20 @@ "9_281_field { field_number: 2 }" "Frosty Delivery" "9_282_field { field_number: 2 }" "Glacial Glazed" "9_283_field { field_number: 2 }" "Cookie Fortress" + "9_284_field { field_number: 2 }" "Sarsparilla Sprayed" + "9_285_field { field_number: 2 }" "Swashbuckled" + "9_286_field { field_number: 2 }" "Skull Cracked" + "9_287_field { field_number: 2 }" "Misfortunate" + "9_289_field { field_number: 2 }" "Neon-ween" "9_28_field { field_number: 2 }" "American Pastoral" + "9_290_field { field_number: 2 }" "Simple Spirits" + "9_291_field { field_number: 2 }" "Broken Bones" + "9_292_field { field_number: 2 }" "Potent Poison" + "9_293_field { field_number: 2 }" "Searing Souls" + "9_294_field { field_number: 2 }" "Party Phantoms" + "9_295_field { field_number: 2 }" "Polter-Guised" + "9_296_field { field_number: 2 }" "Kiln & Conquer" + "9_297_field { field_number: 2 }" "Necromanced" "9_29_field { field_number: 2 }" "Backcountry Blaster" "9_2_field { field_number: 2 }" "Wrapped Reviver" "9_300_field { field_number: 2 }" "Yeti Coated" @@ -202,7 +207,4 @@ "9_91_field { field_number: 2 }" "Rainbow" "9_92_field { field_number: 2 }" "Killer Bee" "9_93_field { field_number: 2 }" "Coffin Nail" - "9_97_field { field_number: 2 }" "97: wearblend" - "9_98_field { field_number: 2 }" "98: dirt/blood/scratches" - "9_99_field { field_number: 2 }" "99: ao/dirt/blood/scratches" "9_9_field { field_number: 2 }" "Forest Fire" \ No newline at end of file