FPS Drop Fix - 06/04/2022

Messages
697
Reaction score
5,334
Points
735
MsvfAxi.png

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.
vOInT9Rbi4ZJl4zY.jpg
AM9qSfWSUrEmzdH6.jpg
qv1P6Y9YHbZy90MK.jpg

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:
Messages
1,663
Reaction score
3,344
Points
755
Location
Great Britain
This is amazing, now I can engage in fisticuffs with my fellow medics and be reminded of the time I've wasted grinding for those coveted four stripes
 
Messages
2,200
Reaction score
3,107
Points
985
Location
United Kingdom
Just got on the server and I really like the sleeves change a lot though I think it could do with some improvements

a7Yt0v6.png

Make them smooth rather than jagged

DyebD2R.png

P94csF5.jpeg


Looking around very quickly does this, I could turn off weapon sway in console to stop this but I like to keep it on

I'll probs edit this post if I notice anything else :)
 
Messages
1,650
Reaction score
3,339
Points
1,190
Just got on the server and I really like the sleeves change a lot though I think it could do with some improvements

a7Yt0v6.png

Make them smooth rather than jagged

DyebD2R.png

P94csF5.jpeg


Looking around very quickly does this, I could turn off weapon sway in console to stop this but I like to keep it on

I'll probs edit this post if I notice anything else :)

@Fredy dont listen to this guy, I think it’s perfect just the way it is xx
 
Messages
697
Reaction score
5,334
Points
735
Just to give a bit more depth to what Creepis said, checkout this video which shows which part of the map are drawn, you can get the same view by using mat_leafvis 3 in singleplayer.

As you can see, the PD parking lot is drawn when you step outside the toilet, which presumable contained a load of police cars. So I think the solution to the problem is to take away cars from the police.
 
Messages
661
Reaction score
1,471
Points
760
Location
Maneti Chao
Just to give a bit more depth to what Creepis said, checkout this video which shows which part of the map are drawn, you can get the same view by using mat_leafvis 3 in singleplayer.

As you can see, the PD parking lot is drawn when you step outside the toilet, which presumable contained a load of police cars. So I think the solution to the problem is to take away cars from the police.
The situation occured at projex not slums
 
Top