Render IEntity entities on the client
Admer456 opened this issue · 10 comments
At the time of writing this issue, clients are unable to render IEntities. SharedComponent
has been implemented for them to replace sharedEntity_t
. The renderer DLL may need to be converted to C++ to support rendering of them.
Find the functions responsible for sending the entities to the clients, which leads to functions where the client actually submits the entity for rendering, later performing the entity rendering itself. Then modify them accordingly.
SV_WriteSnapshotToClient might be useful here :3
MSG_WriteDeltaEntity is gonna need a version that accepts IEntity
Alright, now in the client DLL, we need to deal with the 2 different entity systems inside snapshots. How do I do this, I don't know. But I will find out eventually.
It looks like we're gonna have to deal with some stuff in CL_GetSnapshot to get this to work, otherwise the client won't receive any data about which entity belongs to which entity system.
CL_DeltaEntity and CL_ParsePacketEntities will have to be modified to take SharedComponent
s into account.
Additionally, we will need to send 1 extra byte over the network, in regards to the entity system type.
Done. Entity networking seems to be mostly done in that regard, but we do have some issues on the serverside once again - sv.entities
is somehow nullptr
.
SV_AreaEntities_r needs to be modified to take IEntity
into account.
The decision has been made. IEntity won't be integrated inside the engine just yet. It'll be in the game DLL only.
IEntity will, for now, use the entityShared_t
and entityState_t
instead of SharedComponent
.