Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions src/shared/client/cg_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -295,14 +295,9 @@ void trap_R_ClearScene()
cmdBuffer.SendMsg<Render::ClearSceneMsg>();
}

/* HACK: We need the entityNum to get the correct positions for entities that need to be attached to another entity's bone
This must be equal to the r_numEntities in engine at the time of adding the entity */
static int entityNum;
int trap_R_AddRefEntityToScene( const refEntity_t *re )
void trap_R_AddRefEntityToScene( const refEntity_t *re )
{
cmdBuffer.SendMsg<Render::AddRefEntityToSceneMsg>(*re);
entityNum++;
return entityNum - 1;
}

void trap_R_SyncRefEntities( const std::vector<EntityUpdate>& ents ) {
Expand Down Expand Up @@ -380,7 +375,6 @@ void trap_R_AddLightToScene( const vec3_t origin, float radius, float intensity,

void trap_R_RenderScene( const refdef_t *fd )
{
entityNum = 0;
cmdBuffer.SendMsg<Render::RenderSceneMsg>(*fd);
}

Expand Down
2 changes: 1 addition & 1 deletion src/shared/client/cg_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ qhandle_t trap_R_RegisterModel( const char *name );
qhandle_t trap_R_RegisterSkin( const char *name );
qhandle_t trap_R_RegisterShader( const char *name, int flags );
void trap_R_ClearScene();
int trap_R_AddRefEntityToScene( const refEntity_t *re );
void trap_R_AddRefEntityToScene( const refEntity_t *re );
void trap_R_SyncRefEntities( const std::vector<EntityUpdate>& ents );
std::vector<LerpTagSync> trap_R_SyncLerpTags( const std::vector<LerpTagUpdate>& lerpTags );
void trap_R_AddPolyToScene( qhandle_t hShader, int numVerts, const polyVert_t *verts );
Expand Down
Loading