Skip to content

Conversation

@Princess-Cheeseballs
Copy link
Member

@Princess-Cheeseballs Princess-Cheeseballs commented Jul 24, 2025

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

@PJBot PJBot added S: Needs Review Status: Requires additional reviews before being fully accepted. Not to be replaced by S: Approved. S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. labels Jul 24, 2025
@github-actions github-actions bot added the size/S Denotes a PR that changes 10-99 lines. label Jul 24, 2025
Copy link
Contributor

@sudobeans sudobeans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it

@ToastEnjoyer ToastEnjoyer added T: Bugfix Type: Bugs and/or bugfixes P2: Raised Priority: Item has a raised priority, indicating it might get increased maintainer attention. D3: Low Difficulty: Some codebase knowledge required. A: General Interactions Area: General in-game interactions that don't relate to another area. and removed S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. labels Aug 3, 2025
@Fildrance
Copy link
Contributor

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.
About chaning friction and checking requested friction to not add status effect when not needed - yeah, its fine :3

@PJBot PJBot added the S: Approved Status: Reviewed and approved by at least one maintainer; a PR may require another approval. label Aug 8, 2025
@Fildrance Fildrance merged commit ce7b7c1 into space-wizards:master Aug 8, 2025
10 checks passed
@slarticodefast
Copy link
Member

Can we log an error message or debug assert in case a status effect is applied for 0 seconds?
Or do we already do?

@Princess-Cheeseballs
Copy link
Member Author

Can we log an error message or debug assert in case a status effect is applied for 0 seconds?

Or do we already do?

We don't but it instead exits early. This helps avoid having to copypaste the check everywhere

@Fildrance
Copy link
Contributor

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A: General Interactions Area: General in-game interactions that don't relate to another area. D3: Low Difficulty: Some codebase knowledge required. P2: Raised Priority: Item has a raised priority, indicating it might get increased maintainer attention. S: Approved Status: Reviewed and approved by at least one maintainer; a PR may require another approval. S: Needs Review Status: Requires additional reviews before being fully accepted. Not to be replaced by S: Approved. size/S Denotes a PR that changes 10-99 lines. T: Bugfix Type: Bugs and/or bugfixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Slippery things with zero knockdown time mispredicts (maybe)

7 participants