Garry's Mod

Garry's Mod

481 个评价
Seats Network Optimizer
   
奖励
收藏
已收藏
取消收藏
素材类型: 插件
插件类型: 载具
插件标签: 建筑, 角色扮演
文件大小
发表于
更新日期
1.091 KB
2016 年 2 月 12 日 下午 8:35
2017 年 9 月 7 日 下午 9:32
5 项改动说明 ( 查看 )

订阅以下载
Seats Network Optimizer

在 Cédric GÉRILLE [GiletJaune] 的 8 个合集中
Board Games by Mohamed Rachid
16 件物品
The TTT by Mohamed Rachid
39 件物品
Mohamed Rachid's Vehicles Paradize
191 件物品
The DarkRP by Mohamed Rachid
44 件物品
Soccer by Mohamed RACHID
37 件物品
Université Joseph Poireau (serveur)
70 件物品
G-1:788429
50 件物品
Optimization addons
7 件物品
描述
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 条留言
N 2024 年 2 月 19 日 上午 11:30 
@AxelNoir I'm sure yes, since seats in simfphys vehicles use prop_vehicle_prisoner_pod I beleive
Cédric GÉRILLE [GiletJaune]  [作者] 2023 年 12 月 13 日 上午 10:36 
I took a random picture on the Internet, of course. I don't make my own drawings.
Pooscamp 2023 年 12 月 13 日 上午 9:11 
Frutiger Aero preview picture
Cédric GÉRILLE [GiletJaune]  [作者] 2022 年 8 月 24 日 上午 11:30 
Hehe you're welcome, bug busted! 👌
КОСТЯ ПАКИСТАН 2022 年 7 月 28 日 上午 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]  [作者] 2021 年 6 月 5 日 上午 3:09 
They are added to the list with a hook on OnEntityCreated, obviously.
Joker Gaming 2021 年 6 月 4 日 下午 4:04 
what if seat entities are created then?
Cédric GÉRILLE [GiletJaune]  [作者] 2021 年 6 月 4 日 下午 3: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 2021 年 5 月 29 日 下午 1:20 
(on a server with no seats, N=0, it runs it every frame)
Joker Gaming 2021 年 5 月 29 日 下午 1: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...