Лимит (предельное количество) объектов
Из соображений распределения памяти, существует ограничение на количество объектов, которыми GoldSrc/
Source/
Source 2 может управлять одновременно.
Также следует учитывать общий размер (в байтах) данных об объектах в файле карты, даже если количество объектов находится в указанных пределах. Передача большого объёма данных об объектах от сервера к клиенту может занять значительное время и привести к сбоям.

Ограничения
GoldSrc
По умолчанию лимит составляет 1'200 записей edict_t, но его можно увеличить до 2'048, отредактировав файл liblist.gam модификации, добавив в него edicts "2048".
Этот способ можно использовать для однопользовательских модификаций, но не следует применять для многопользовательских карт существующих игр, поскольку сервер и все клиенты должны иметь одинаковые ограничения.
В Sven Co-op лимит был увеличен до 8'192.
До выхода обновления в честь 25-летия Half-Life, а также в некоторых отдельных играх GoldSrc, лимит по умолчанию составлял 900 записей edict_t.
All entities on the server are edicts, and are networked to clients. Intangible entities can be made clientside-only using MAKE_STATIC, but they will be removed upon loading a saved game.
Ограничения
Source
Существует 2 группы объектов:
- Несетевые объекты, которые существуют только на клиенте или на сервере (например, куклы трупов на клиенте, класс CLogicalEntity на сервере). В предшествующих VScript версиях платформы и в
их может быть до 2'048, а в
,
,
,
до 6144 штук.
- Сетевые объекты, ассоциированые с записями edict_t, которые передаются между клиентом и сервером. Всего их может быть до 2'048 штук.
- В
Garry's Mod доступно до 8'192 сетевых объектов, и до 8'192 несетевых объектов.
- В
Mapbase доступно до 16'384 объектов "отображаемых на стороне клиента". (Внутренние точечные объекты, такие как prop_static) [1]
If the game tries to assign an edict past the limit it will exit with an error message, but if it tries to create a non-networked entity past the limit it will merely refuse and print a warning to the console. The logic behind this may be that an entity spawned dynamically (i.e. not present in the map) but not assigned an edict probably isn't too important.
The two entity lists are created by CBaseEntityList::CBaseEntityList()
using NUM_ENT_ENTRIES
and MAX_EDICTS
. Neither of those values can be changed without breaking compatibility with the engine.
In VScript games, non-networked entities have 2 extra bits reserved compared to edicts. Since the pool of entities is shared between entities and non-entities, this is why non-networked entities have a higher limit.

- Temporary entities and prop_static's, env_sprite_clientside , or prop_detail props do not count toward either limit. VBSP enforces limits for these, but these can be raised with a modified VBSP.
- If you're creating lots of individual objects all the time, consider rolling them all into a single manager entity.
- In-game, use console commands like report_entities and cl_showents to get an idea of how many entities are present at that current state.
- Prop entities that use a model with $collisionjoints will generate one phys_bone_follower for every convex piece of their collision model. These can quickly eat up the edict count! Enabling the "Disable Bone Followers" keyvalue on the prop will disable bone followers, although the prop will no longer have a functioning collision model, and the model will not be able to ragdoll.
Ограничения VMF
В редакторе Hammer нет ограничений на количество объектов, однако лимит компилятора VBSP зависит от игры:
- 8'192 в
Source 2007/
Source 2013/
Ветвь Team Fortress 2
- 16'384 в
Alien Swarm/
Portal 2
- 20'480 в
Counter-Strike: Global Offensive
- 65'536 в
Mapbase/
Garry's Mod, начиная с марта 2024.


public/bspfile.h
. Это программное ограничение, модифицированный компилятор VBSP способен компилировать столько объектов, сколько позволяет память.This is double the combined total accepted by the engine, which may be because it at first treats internal entities (such as prop_static and env_cubemap) like normal entities, or perhaps because it generates a lot of detail props.
VBSP also recommends an entdata size limit of 384KB, but this is in no way enforced.
Ограничения
Source 2
В Source 2, а именно в
S&box, количество сетевых объектов ограничено 16'384 записями edict_t.
Counter-Strike 2 - максимум до 16'384 записей edict_t и до 16'384 серверных объектов.
There appears to be no limit for map compiles, or it is tied to the networked entity limit.
Смотреть также
Внешние ссылки
Ссылки
- Mapbase 3.1 Release Notes https://www.moddb.com/mods/mapbase/news/mapbase-v3-1-released ModDB Retrieved Wednesday, March 6, 2024