Coder Social home page Coder Social logo

Comments (1)

nosoop avatar nosoop commented on June 7, 2024

Managed to reproduce this while refunding with the custom Scout secondary / melee equipped on any MvM map.

I think I've seen this one before — what's happening is that at least one or more of the attributes being applied matches one of the upgrades available in MvM.

The upgrade system uses the same "runtime attribute" functionality that CWX (or rather, the underlying TF2Attributes) uses, and for some reason the game has a really slow path of iterating through each upgrade step even if it extends past the limit of what the game normally supports; in your config I think the critboost, clip size, and maybe max health bonuses match one of the game's existing upgrades.

For each upgrade step it respawns the player and revalidates their loadout, so as you can guess, having something like +99900% ammo capacity being upgraded in +50% increments is painfully slow. (I suspect something similar is what's causing players to get ejected from MvM during refunds with the recent net_chan_limit_msec changes, just at a smaller scale.)

Edicts are only swept at one point in each game tick, and each respawn causes a new weapon to be generated, which is what leads up to the crash.

This isn't specific to CWX, but I suspect that if this doesn't affect CW3, it's because items are reapplied instead of persisted. Hard to tell for sure though.

The current workaround is to use an attribute name that doesn't match one of the game's upgrades (using an attribute with the same attribute class). If one doesn't exist, you can create one using a schema injecting-method such as Hidden Dev Attributes. The benefit of this method is that any upgrades recognized on the client for that item won't cause the game to crash (the UI will also try to draw an unbounded number of upgrade steps).

Leaving this open since this is a valid issue; however I can't guarantee that I'll have a fix for this. I'm hearing the "slow upgrade step" logic is going to be optimized since it does cause issues with the recent changes mentioned, so we may just see if it gets fixed that way.

I've also added a note for this in the getting started / item creation page.

from sm-tfcustomweaponsx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.