Open SmileyAG opened 6 months ago
Personally I only do stuffs for movement maps so I won't have much use of this. However, when it comes to servers running big maps, this might be very needed. This idea will work nicely in other projects like ReHLDS. I can try implementing this and see. I can use BXT to test my implementation before getting it into something different.
Oh wow, after that comment it instantly came to me that it won't work in servers because clients need to decode the messages too. Woop woop.
Oh wow, after that comment it instantly came to me that it won't work in servers because clients need to decode the messages too. Woop woop.
In fact, these limits for temp entities can be expanded without engine changes, but then you must have access to change the code of both client and server sides
In simple words, expanding these limits for example for AG is not impossible, because you can make requests regarding these changes for the client (OpenAG, BHL-Rebased) and server (Adrenaline Gamer 6.7) sides
Here is the full guide on this topic: https://twhl.info/wiki/page/Tutorial%3A_Going_beyond_8192_units%3A_Part_2 But I will briefly outline to you what is generally required for these changes:
WRITE_COORD
to WRING_LONG
CL_ParseTEnt
function in the engine, because it implements the logic of most temp entity events)Also, in the file common/const.h
from HLSDK there is documentation on how to parse each type of temp entity, which will greatly help you with your own implementation on the client side: https://github.com/ValveSoftware/halflife/blob/c7240b965743a53a29491dd49320c88eecf6257b/common/const.h#L121
And yes, the code of these temp entities is quite implementable, since they also rely on the use of an engine interface that is transmitted to the client
For example, if in CL_ParseTEnt function for the TE_KILLBEAM
case code used (*efx.R_BeamKill)(iVar15);
Then in the client code this can be implemented as gEngfuncs.pEfxAPI->R_BeamKill(iVar15);
TLDR:
common/const.h
file to see the documentation of how to parse the each specific event of temp entity
Related to big map PR: https://github.com/YaLTeR/BunnymodXT/pull/500
Well, @khanghugo asked about expanding the origin limit for temp entities, and in general I have a concept of how this can be implemented:
PF_MessageBegin_I
,PF_WriteCoord_I
,PF_MessageEnd_I
,CL_ParseTEnt
andMSG_ReadCoord
engine functionssvc_tempentity
message callsif (msg_type == SVC_TEMPENTITY) { if (is_big_map) msg_svc_tempentity_intercepted = true; }
ORIG_PF_MessageBegin_I(msg_dest, msg_type, pOrigin, ed);
HOOK_DEF_0(HwDLL, void, __cdecl, PF_MessageEnd_I) { ResetTrackedMessages(); ORIG_PF_MessageEnd_I(); }
The engine also has a function PF_StaticDecal which sent coordinates via
MSG_WriteCoord
, so it may also need to be replaced there with MSG_WriteLongPerhaps there are some other temp entities in the engine that are sent via
MSG_WriteCoord
, I don’t seem to have found them, but I also didn’t look deeply enough