-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Fix Whoopie Cushions from lagging the game. #39194
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
Fix Whoopie Cushions from lagging the game. #39194
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it
|
Very good changes imo, dunno how we missed it initially! I moved duration checks inside system, as they all check for invalid usage scenario. i was somewhat hesitant about replacing warning u placed with just plan check and return, but it looks like a questionable guard to me, a little bit ugly. Yet i am unsure about it. |
|
Can we log an error message or debug assert in case a status effect is applied for 0 seconds? |
We don't but it instead exits early. This helps avoid having to copypaste the check everywhere |
|
yes i asked to remove that coz it will KINDA incentivize double validation in some cases - like when you do calculated duration and it can be 'negative update' - like, its fine, we just exit early... |
About the PR
Why do Whoopie Cushions even use SlipperyComponent? Probably ancient code.
Either way it resulted in client side hitching due to spawning and deleting two status effects in the same tick that did absolutely nothing.
Resolves: #39190
Why / Balance
Better game performance good.
Also we shouldn't ever be applying a status effect for 0 seconds or less.
Technical details
Added a check to prevent a status effect from being spawned and deleted in the same tick (If the time is less than or equal to 0, don't spawn it).
Made some minor optimizations to slippery code as well, although the former fixed solved the issue I'm taking an aggressive approach.
Added two new overloads to Friction Status Effect because the lack of overloads bothered me.
Fixed whoopie cushions applying friction when they shouldn't
Media
Before:
Base.Profile.2025.07.24.-.14.10.30.20.mp4
After:
Base.Profile.2025.07.24.-.14.13.06.21.mp4
Requirements
Breaking changes
Changelog