Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors in 3.0.1 update #7

Closed
ghost opened this issue Oct 14, 2021 · 2 comments · Fixed by #8
Closed

Errors in 3.0.1 update #7

ghost opened this issue Oct 14, 2021 · 2 comments · Fixed by #8
Assignees
Labels
bug Something isn't working fixed

Comments

@ghost
Copy link

ghost commented Oct 14, 2021

Describe the bug

New players are connecting to the server with TF_WEAPON_BAT equipped regardless of the class they're on, the only way to get rid of this is to "RESET EVERYTHING" through the menu, which brings back the normal weapon. Also, Unusual effects aren't showing in the menu even with the convar enabled.

Screenshot

L 10/13/2021 - 21:06:55: [TF2ITEMS] ---------------------------------------
L 10/13/2021 - 21:06:55: [TF2ITEMS] >>> szClassname = 
L 10/13/2021 - 21:06:55: [TF2ITEMS] >>> iItemDefinitionIndex = 0
L 10/13/2021 - 21:06:55: [TF2ITEMS] >>> iEntityQuality = 5
L 10/13/2021 - 21:06:55: [TF2ITEMS] >>> iEntityLevel = 74
L 10/13/2021 - 21:06:55: [TF2ITEMS] ---------------------------------------
L 10/13/2021 - 21:06:55: [TF2ITEMS] >>> iAttributeDefinitionIndex = 134
L 10/13/2021 - 21:06:55: [TF2ITEMS] >>> flValue = 0.000000
L 10/13/2021 - 21:06:55: [TF2ITEMS] ---------------------------------------
L 10/13/2021 - 21:06:55: [TF2ITEMS] >>> iAttributeDefinitionIndex = 2027
L 10/13/2021 - 21:06:55: [TF2ITEMS] >>> flValue = 0.000000
L 10/13/2021 - 21:06:55: [TF2ITEMS] ---------------------------------------
L 10/13/2021 - 21:06:55: [TF2ITEMS] >>> iAttributeDefinitionIndex = 2022
L 10/13/2021 - 21:06:55: [TF2ITEMS] >>> flValue = 0.000000
L 10/13/2021 - 21:06:55: [TF2ITEMS] ---------------------------------------
L 10/13/2021 - 21:06:55: [TF2ITEMS] >>> iAttributeDefinitionIndex = 542
L 10/13/2021 - 21:06:55: [TF2ITEMS] >>> flValue = 0.000000
L 10/13/2021 - 21:06:55: [TF2ITEMS] ---------------------------------------
L 10/13/2021 - 21:06:55: [TF2ITEMS] >>> iAttributeDefinitionIndex = 2053
L 10/13/2021 - 21:06:55: [TF2ITEMS] >>> flValue = 0.000000
L 10/13/2021 - 21:06:55: [TF2ITEMS] ---------------------------------------
L 10/13/2021 - 21:06:55: [TF2ITEMS] >>> iAttributeDefinitionIndex = 2025
L 10/13/2021 - 21:06:55: [TF2ITEMS] >>> flValue = 0.000000
L 10/13/2021 - 21:06:55: [TF2ITEMS] ---------------------------------------
L 10/13/2021 - 21:06:55: [TF2ITEMS] >>> iAttributeDefinitionIndex = 2014
L 10/13/2021 - 21:06:55: [TF2ITEMS] >>> flValue = 0.000000
L 10/13/2021 - 21:06:55: [TF2ITEMS] ---------------------------------------
L 10/13/2021 - 21:06:55: [TF2ITEMS] >>> iAttributeDefinitionIndex = 2013
L 10/13/2021 - 21:06:55: [TF2ITEMS] >>> flValue = 0.000000
L 10/13/2021 - 21:06:55: [TF2ITEMS] ---------------------------------------
L 10/13/2021 - 21:06:55: [TF2ITEMS] >>> iAttributeDefinitionIndex = 834
L 10/13/2021 - 21:06:55: [TF2ITEMS] >>> flValue = 0.000000
L 10/13/2021 - 21:06:55: [TF2ITEMS] ---------------------------------------
L 10/13/2021 - 21:06:55: [TF2ITEMS] >>> iAttributeDefinitionIndex = 725
L 10/13/2021 - 21:06:55: [TF2ITEMS] >>> flValue = 0.000000
L 10/13/2021 - 21:06:55: [TF2ITEMS] ---------------------------------------
L 10/13/2021 - 21:06:55: [TF2ITEMS] >>> iAttributeDefinitionIndex = 1009
L 10/13/2021 - 21:06:55: [TF2ITEMS] >>> flValue = 0.000000
L 10/13/2021 - 21:06:55: [TF2ITEMS] ---------------------------------------
L 10/13/2021 - 21:06:55: [TF2ITEMS] >>> iAttributeDefinitionIndex = 1008
L 10/13/2021 - 21:06:55: [TF2ITEMS] >>> flValue = 0.000000
L 10/13/2021 - 21:06:55: [TF2ITEMS] ---------------------------------------
L 10/13/2021 - 21:06:55: [TF2ITEMS] >>> iAttributeDefinitionIndex = 1007
L 10/13/2021 - 21:06:55: [TF2ITEMS] >>> flValue = 0.000000
L 10/13/2021 - 21:06:55: [TF2ITEMS] ---------------------------------------
L 10/13/2021 - 21:06:55: [TF2ITEMS] >>> iAttributeDefinitionIndex = 150
L 10/13/2021 - 21:06:55: [TF2ITEMS] >>> flValue = 1.000000
L 10/13/2021 - 21:06:55: [TF2ITEMS] ---------------------------------------
L 10/13/2021 - 21:06:55: [SM] Exception reported: Item is NULL. File a bug report if you are sure you set all the data correctly. (Try the FORCE_GENERATION flag.)
L 10/13/2021 - 21:06:55: [SM] Blaming: tf2item_weapons.smx
L 10/13/2021 - 21:06:55: [SM] Call stack trace:
L 10/13/2021 - 21:06:55: [SM]   [0] TF2Items_GiveNamedItem
L 10/13/2021 - 21:06:55: [SM]   [1] Line 776, tf2item_weapons.sp::GivePostWeapon
L 10/13/2021 - 21:06:55: [SM]   [2] Line 754, tf2item_weapons.sp::ApplyChanges
L 10/13/2021 - 21:06:55: [SM]   [3] Line 765, tf2item_weapons.sp::GiveStrangeWeapon
L 10/13/2021 - 21:06:55: [SM]   [4] Line 612, tf2item_weapons.sp::GiveSpecialWeapon
L 10/13/2021 - 21:06:55: [SM]   [5] Line 582, tf2item_weapons.sp::OnPlayerSpawn
@punteroo punteroo self-assigned this Oct 14, 2021
@punteroo punteroo added being worked on bug Something isn't working labels Oct 14, 2021
@punteroo punteroo linked a pull request Oct 14, 2021 that will close this issue
@punteroo
Copy link
Owner

punteroo commented Oct 14, 2021

This is caused because the weapon preferences enum struct wasn't setting correctly -1 on connection to all override settings, causing a wrong initialization to 0.

This would cause the check for an override to fail (because 0 > -1 and WeaponsInfo.Special initializes on 0) (oops!) giving the player the weapon with iItemDefinitionIndex on 0 (The Stock Bat). Fixed with 49a754b

The issue why Unusual Overrides are not showing up regardless of the ConVar value is because of a misplaced parenthesis (another oopsie, now that's embarrassing!). Fixed with d6e9fdf

I'm issuing a hotfix for this issue as we speak. Should be up shortly. Thank you for spotting something that really flew over my head.

punteroo added a commit that referenced this issue Oct 14, 2021
now, players that connect get their preferences reset to -1 like they should
punteroo added a commit that referenced this issue Oct 14, 2021
pesky little stupid parenthesis!!!!!!!111!1!!!!
@punteroo
Copy link
Owner

This has been fixed on latest release v3.0.2

Thank you so much for reporting this issue!
https://github.com/punteroo/TF2-Item-Plugins/releases/tag/v3.0.2

Repository owner locked and limited conversation to collaborators Oct 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant