Admer456/ioq3-burek

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

HOLY HECC, this is so exciting
IEntity now almost renders on the client, albeit the client wrongly interprets the new entity bytes

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 SharedComponents 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.

6ef7eeb, 1572aad reverted most of the work done for this issue.

The solution to this issue is now (most likely) just a matter of giving model indices to entities, and linking them properly into the world.

506d92e and cf4ae90 have been the last steps to close this. Hoorah!