darmuh / suitsTerminal

suitsTerminal for Lethal Company
https://thunderstore.io/c/lethal-company/p/darmuh/suitsTerminal/
MIT License
1 stars 1 forks source link

Disable ChangeableSuit gameobject when suits are supposed to be hidden #11

Closed Legonzaur closed 1 week ago

Legonzaur commented 2 months ago

After troubleshooting lags for a long time on my modded gameplays on Linux, I found out that most of the lag I encountered ingame was caused by all the rack suits being rendered even when they are supposed to be hidden.

The suits are far away from the ship, located in 800 -100 0, but are still rendered.

This causes heavy slowdowns especially in heavily modded and VRAM-limited environments. This issue is not limited to Linux, but is way less noticeable on Windows.

This simple patch should disable the GameObject entirely, allowing the game to run much smoother.

Frame drops before patch (accentuated by OBS x264 encoding)

https://github.com/darmuh/suitsTerminal/assets/34353603/61b8ad58-9d2f-4f51-b1ac-1001d77cfb73

No frame drops after patch

https://github.com/darmuh/suitsTerminal/assets/34353603/7161dd7d-cea0-4348-adc6-a09609a2c5cf

Legonzaur commented 2 months ago

Disabling the GameObject seems to prevent the user to change suits, but disabling the SkinnedMeshRenderer should be fine as a workaround

darmuh commented 2 months ago

thanks for your efforts on this, i'll put this change in the next update 👍

darmuh commented 1 week ago

Added this change in 1.3.0, sorry for the long delay.

I am still somewhat new when it comes to github so I may have not added your pull request properly, but I do want to thank you again for your efforts on this. I tried to credit you where I could in the changelog for this fix. Feel free to continue to contribute to this project where you see fit 😁