Garry's Mod

Garry's Mod

Ocen: 482
Seats Network Optimizer
   
Przyznaj nagrodę
Ulubione
Ulubione
Usuń z ulubionych
Content Type: Addon
Addon Type: Vehicle
Addon Tags: Build, Roleplay
Rozmiar pliku
Zamieszczono
Zaktualizowano
1.091 KB
12 lutego 2016 o 20:35
7 września 2017 o 21:32
Listy zmian: 5 ( zobacz )

Zasubskrybuj, aby pobrać
Seats Network Optimizer

W 8 kolekcjach stworzonych przez Cédric GÉRILLE [GiletJaune]
Board Games by Mohamed Rachid
Przedmioty: 16
The TTT by Mohamed Rachid
Przedmioty: 39
Mohamed Rachid's Vehicles Paradize
Przedmioty: 191
The DarkRP by Mohamed Rachid
Przedmioty: 44
Soccer by Mohamed RACHID
Przedmioty: 37
Université Joseph Poireau (serveur)
Przedmioty: 70
G-1:788429
Przedmioty: 50
Optimization addons
Przedmioty: 7
Opis
Optimizer for servers & multiplayer games

This addon is designed to significantly reduce network usage when using numerous seats and prisoner pods.
This addon is totally useless in a local game, but it can decrease the network usage related to prop_vehicle_prisoner_pod on servers.
It works for standalone seats, passenger seats, SCars, Sit anywhere, prisoner pods.

Important
Note: The same trick applies to (not handled in this add-on):
  • env_sprite entities with an animated material
If you are a mapper, please make a lua_run entity triggered by a logic_auto entity, with the following Lua code:
for _,e in ipairs(ents.FindByClass('env_sprite'))do e:AddEFlags(EFL_NO_THINK_FUNCTION)end

How can I know how much traffic is saved?
Type in console: net_graph 3
The red trace is about entities traffic. It can get much lower with this addon.

Note
A problem causing non-seat vehicles to fail has been fixed on Feb 27, 2016.

How does it work?
The problem is that the internal Think of prop_vehicle_prisoner_pod entities produces a useless network usage, which is noticeable when there are many of them.
The Seats Network Optimizer disables the internal Think of each prop_vehicle_prisoner_pod, and re-enables one of them on each server's Think. Also when you use or leave a seat, its internal Think is re-enabled until the animation is finished.
More details in this bug report: High network usage caused by the prop_vehicle_prisoner_pod's Think[github.com]
Komentarzy: 45
Gabriel Morales 19 lutego 2024 o 11:30 
@AxelNoir I'm sure yes, since seats in simfphys vehicles use prop_vehicle_prisoner_pod I beleive
Cédric GÉRILLE [GiletJaune]  [autor] 13 grudnia 2023 o 10:36 
I took a random picture on the Internet, of course. I don't make my own drawings.
Pooscamp 13 grudnia 2023 o 9:11 
Frutiger Aero preview picture
Cédric GÉRILLE [GiletJaune]  [autor] 24 sierpnia 2022 o 11:30 
Hehe you're welcome, bug busted! 👌
КОСТЯ ПАКИСТАН 28 lipca 2022 o 5:19 
omfg that shit works as well as expected i had very heavy net channel and tickrate rape on my sandbox server where the average online is 35-50 and there is tons of funny simpfhys shit and ur masteroiece boosted server performance ty man
Cédric GÉRILLE [GiletJaune]  [autor] 5 czerwca 2021 o 3:09 
They are added to the list with a hook on OnEntityCreated, obviously.
Joker Gaming 4 czerwca 2021 o 16:04 
what if seat entities are created then?
Cédric GÉRILLE [GiletJaune]  [autor] 4 czerwca 2021 o 15:46 
No you misread the code. ents.FindByClass() runs once only during the 1st execution. What are you talking about? It's how I keep the seat list up-to-date after a Lua refresh.
Joker Gaming 29 maja 2021 o 13:20 
(on a server with no seats, N=0, it runs it every frame)
Joker Gaming 29 maja 2021 o 13:19 
it appears to run it every N frames where N=num seats which is nonetheless stupid, just implement it properly by storing the entities as they are created. ents.FindByClass is very expensive as it calls ents.GetAll internally

i tried this on my server (which usually has about 40 players in seats) and it didn't seem to lower the network usage anyway so...