Conversation
Newer Source engine versions now use a dynamically allocated buffer for the map entity lump, and some maps have over 16MB of entity data - far larger than our 2MB limit. There is no sane way we can currently handle this, so just remove the functionality from the forward until a more comprehensive API can be designed. Fixes #1470
The change in behaviour to the OnLevelInit forward params isn't obvious when compiling a plugin, deprecate it to make it a lot more obvious that something has changed. Some plugins rely just on the timing of OnLevelInit rather than doing anything with the entity lump, for these plugins offer a new OnMapInit forward that is implemented in core rather than sdkhooks. If / when we offer a new entity lump manipulation API in the future this'll be the forward where it can be used to make changes.
Headline
left a comment
There was a problem hiding this comment.
Definitely the right direction regarding this.
Would the future new API be an extension of this new forward or would be be through a different avenue? Any fcompat we can do now to anticipate that coming new API?
dvander
left a comment
There was a problem hiding this comment.
This does seem the right way to go, unfortunately.
I'm imagining some new natives where the read-only ones can be used inside and after this forward, and the write ones can be used only inside this forward - no changes to the actual forward itself. |
|
Hi. each element of mapEntities will have type char, so you can set up such ArrayList on higher level and pass it like this. And So idea is something like pack big data in ArrayList and on return if data was changed unpack it back. |
|
Are entities still passed in a key/value map? I feel like a specialized set of natives for interacting with the entity lump would be ideal. Such a big list/string is unworkable in Pawn. |
If it will be splitted as describe then yes it won't damage key/value map. It will be just few key/value map / strings, whatever u called it. |
Newer Source engine versions now use a dynamically allocated buffer for
the map entity lump, and some maps have over 16MB of entity data - far
larger than our 2MB limit.
There is no sane way we can currently handle this, so just remove the
functionality from the forward until a more comprehensive API can be
designed.
The change in behaviour to the OnLevelInit forward params isn't obvious
when compiling a plugin, deprecate it to make it a lot more obvious that
something has changed.
Some plugins rely just on the timing of OnLevelInit rather than doing
anything with the entity lump, for these plugins offer a new OnMapInit
forward that is implemented in core rather than sdkhooks. If / when we
offer a new entity lump manipulation API in the future this'll be the
forward where it can be used to make changes.
Fixes #1470