Closed Acecool closed 3 years ago
Pretty sure this can be done by checking for local player entity recreation
Bump?
Do you want this only clientside when it requests a full update? Not when the client actually receives one? Because I am not sure where I'd hook onto for the latter.
The code you linked is for server side, and it doesn't fit the initial request.
Because he mentioned resyncing net message stuff I figured this was a request for a server side full update hook. I'll just make a new request for it.
Maybe I am wrong idk. I will wait for other opinions on what this hook should be.
For client side stuff:
Client requesting a full update packet: https://github.com/VSES/SourceEngine2007/blob/master/src_main/engine/baseclient.h#L138
Client receiving a full update packet:
If SVC_PacketEntities.m_bIsDelta
/CEntityReadInfo.m_bIsDelta
is false it should be a full update packet.
https://github.com/VSES/SourceEngine2007/blob/master/src_main/engine/cl_ents_parse.cpp#L563-L587
Added serverside as OnRequestFullUpdate game event, we can't really have Lua in engine.dll It has all the same data as player_connect_client event, save for bot field.
If people really need those clientside variations, don't hesitate to let us know.
I'd like a new hook for when the Game Requests Full Update. The reason demos don't play back properly is because not everyone uses expensive NWVars ( https://dl.dropboxusercontent.com/u/26074909/tutoring/benchmarking_tips/benchmarking_nw_vars.lua ) which automatically resync. When a demo is created, it is like a new player connected and only variables set after the recording are monitored. This causes issues with playback.
If we had a hook, those of us using our own net-system can resync all data when a user starts a demo so the demo plays back flawlessly.