Garry's Mod
479 lượt đánh giá
Seats Network Optimizer
   
Giải thưởng
Yêu thích
Đã yêu thích
Bỏ thích
Content Type: Addon
Addon Type: Vehicle
Addon Tags: Build, Roleplay
Kích cỡ file
Đã đăng
Đã cập nhật
1.091 KB
12 Thg02, 2016 @ 8:35pm
7 Thg09, 2017 @ 9:32pm
5 ghi chú thay đổi ( xem )

Đăng ký để tải xuống
Seats Network Optimizer

Trong 8 bộ sưu tập tạo bởi Cédric GÉRILLE [GiletJaune]
Board Games by Mohamed Rachid
16 vật phẩm
The TTT by Mohamed Rachid
39 vật phẩm
Mohamed Rachid's Vehicles Paradize
191 vật phẩm
The DarkRP by Mohamed Rachid
44 vật phẩm
Soccer by Mohamed RACHID
37 vật phẩm
Université Joseph Poireau (serveur)
70 vật phẩm
G-1:788429
50 vật phẩm
Optimization addons
7 vật phẩm
Mô tả
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]
45 bình luận
N 19 Thg02, 2024 @ 11:30am 
@AxelNoir I'm sure yes, since seats in simfphys vehicles use prop_vehicle_prisoner_pod I beleive
Cédric GÉRILLE [GiletJaune]  [tác giả] 13 Thg12, 2023 @ 10:36am 
I took a random picture on the Internet, of course. I don't make my own drawings.
Pooscamp 13 Thg12, 2023 @ 9:11am 
Frutiger Aero preview picture
Cédric GÉRILLE [GiletJaune]  [tác giả] 24 Thg08, 2022 @ 11:30am 
Hehe you're welcome, bug busted! 👌
КОСТЯ ПАКИСТАН 28 Thg07, 2022 @ 5:19am 
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]  [tác giả] 5 Thg06, 2021 @ 3:09am 
They are added to the list with a hook on OnEntityCreated, obviously.
Joker Gaming 4 Thg06, 2021 @ 4:04pm 
what if seat entities are created then?
Cédric GÉRILLE [GiletJaune]  [tác giả] 4 Thg06, 2021 @ 3:46pm 
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 Thg05, 2021 @ 1:20pm 
(on a server with no seats, N=0, it runs it every frame)
Joker Gaming 29 Thg05, 2021 @ 1:19pm 
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...