Closed PonyPhreak closed 1 year ago
I am unable to reproduce this with CWX alone. (I've tested this against start of round / waiting for player respawns, in addition to a forced respawn using a plugin.)
Please retest without Fulcrum and your Item Server plugins to confirm that it is an issue with CWX, because multiple ammo / clip related issues were previously discovered in those two.
Apologies. Looks like it's reproducible without other plugins, but not completely inconsistent — reopening.
It looks like an attribute cache issue; TF2Util_GetWeaponMaxClip
does indeed return a value of 6, so the game is fully convinced that it's supposed to have that clip size.
It looks like calling TF2Attrib_ClearCache
on the weapon at some point should resolve it, but some further investigating is necessary; the ammo is only set during TF2_EquipPlayerEconItem
, which is called during:
CWX_EquipPlayerItem
(which, as documented, is not intended for production use, so any bugs arising from using it is completely out of scope), andOnPlayerLoadoutUpdatedPost
, which is only supposed to spawn in items when they don't already exist on the playerThe issue happens somewhere that doesn't hit this code path.
Environment
Linux; Debian SourceMod 1.12.0.6985, cwx_version" = "X.0.10-4396d59"
Description
I have a simple BFB reskin that I'm running through CWX- However, on forced respawns, the weapon ends with 6 maximum rounds in its clip, instead of the usual 4. Reloading rounds 5 & 6 have stuttered animations. This gives an unfair and unintended advantage over traditional variants.
The following respawn events trigger the issue if the item is equipped prior:
The following do not influence the weapon's max clip size:
The only found fixes: - All fixes are temporary, triggers still cause the bug to reapply
Steps to replicate
Create a cwx BFB- No custom attributes needed.
Load a map, join a team, and equip the custom BFB through CWX. Once Waiting for players ends- your BFB will have 6 rounds in it.
Other information