- Messages
- 715
- Reaction score
- 5,443
- Points
- 750
- Staff
- #1
Many users have pointed out in the past that certain areas of the map sometimes cause massive FPS drops. These could be noticed by just entering a certain area of the map, during raiding or even just standing still. Some of the worst areas that were noted were the area around the beach, the office or even the suburbs highway bend.
I am very glad to announce that we have now identified the root issue and were able to fix it in today's update. After some quick testing it does appear to not happen at all anymore, and even with 100 players on my server I have 140+FPS at the beach at all times as long as no players are around, whereas before even if no player was in sight I could not sustain 60 FPS.
We quickly figured out the issue was located within the PreRender hook by using vprof, but the exact cause could not be determined as easily. After days of hourlong search for the cause of the issue, even going as far as decompiling gmod, browsing through the leaked source code of the source engine and attaching debuggers to the game, the root cause was identified to be viewmodel attachments. Viewmodels are what you see in your own character's hands when you have a weapon equipped, including the weapon, your fists, rings etc.
The old clothing system (from years ago) required us to create these on the serverside and the code was quickly adapted to the new clothing system even though the new system can work with simple clientside entities. While the client technically should not be able to tell that the viewmodel attachments of other players even existed (since they are only networked to the player who it belongs to), somehow they ended up still causing this issue. Possibly they were all positioned in the same spot of the map and it caused issues due to a degenerate BSP tree while rendering, but this is just speculation.
As a solution we have now replaced the serverside viewmodel attachments with fully clientside attachments. This should solve the issue completely, while at the same time reducing load on both server and client which should yield a small FPS boost.
@Tinky
As an added bonus, I have figured out a way to show your actual model's sleeves in the viewmodel instead of the generic arms that were used before.
If you find any issues with this update or more FPS drops, please let me know in this thread or via Steam/Discord!
Note: There is currently a known issue where you do not have hands when holding your keys, it is already fixed in the code and will be applied after tomorrow's server restart.
Last edited: