engine: remove unused host.decalList and host.numdecals
This commit is contained in:
parent
21195b3491
commit
cf26c87872
2 changed files with 8 additions and 13 deletions
|
@ -354,9 +354,6 @@ typedef struct host_parm_s
|
||||||
int window_center_x;
|
int window_center_x;
|
||||||
int window_center_y;
|
int window_center_y;
|
||||||
|
|
||||||
struct decallist_s *decalList; // used for keep decals, when renderer is restarted or changed
|
|
||||||
int numdecals;
|
|
||||||
|
|
||||||
// bug compatibility level, for very "special" games
|
// bug compatibility level, for very "special" games
|
||||||
uint32_t bugcomp;
|
uint32_t bugcomp;
|
||||||
|
|
||||||
|
|
|
@ -681,21 +681,21 @@ Write all the decals into demo
|
||||||
*/
|
*/
|
||||||
void SV_RestartDecals( void )
|
void SV_RestartDecals( void )
|
||||||
{
|
{
|
||||||
decallist_t *entry;
|
decallist_t *list;
|
||||||
int decalIndex;
|
int decalIndex;
|
||||||
int modelIndex;
|
int modelIndex;
|
||||||
sizebuf_t *msg;
|
sizebuf_t *msg;
|
||||||
int i;
|
int i, numdecals;
|
||||||
|
|
||||||
if( !SV_Active( )) return;
|
if( !SV_Active( )) return;
|
||||||
|
|
||||||
// g-cont. add space for studiodecals if present
|
// g-cont. add space for studiodecals if present
|
||||||
host.decalList = (decallist_t *)Z_Calloc( sizeof( decallist_t ) * MAX_RENDER_DECALS * 2 );
|
list = (decallist_t *)Z_Calloc( sizeof( decallist_t ) * MAX_RENDER_DECALS * 2 );
|
||||||
|
|
||||||
#if !XASH_DEDICATED
|
#if !XASH_DEDICATED
|
||||||
if( !Host_IsDedicated() )
|
if( !Host_IsDedicated() )
|
||||||
{
|
{
|
||||||
host.numdecals = ref.dllFuncs.R_CreateDecalList( host.decalList );
|
numdecals = ref.dllFuncs.R_CreateDecalList( list );
|
||||||
|
|
||||||
// remove decals from map
|
// remove decals from map
|
||||||
ref.dllFuncs.R_ClearAllDecals();
|
ref.dllFuncs.R_ClearAllDecals();
|
||||||
|
@ -704,16 +704,16 @@ void SV_RestartDecals( void )
|
||||||
#endif // XASH_DEDICATED
|
#endif // XASH_DEDICATED
|
||||||
{
|
{
|
||||||
// we probably running a dedicated server
|
// we probably running a dedicated server
|
||||||
host.numdecals = 0;
|
numdecals = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// write decals into reliable datagram
|
// write decals into reliable datagram
|
||||||
msg = SV_GetReliableDatagram();
|
msg = SV_GetReliableDatagram();
|
||||||
|
|
||||||
// restore decals and write them into network message
|
// restore decals and write them into network message
|
||||||
for( i = 0; i < host.numdecals; i++ )
|
for( i = 0; i < numdecals; i++ )
|
||||||
{
|
{
|
||||||
entry = &host.decalList[i];
|
decallist_t *entry = &list[i];
|
||||||
modelIndex = SV_PEntityOfEntIndex( entry->entityIndex, true )->v.modelindex;
|
modelIndex = SV_PEntityOfEntIndex( entry->entityIndex, true )->v.modelindex;
|
||||||
|
|
||||||
// game override
|
// game override
|
||||||
|
@ -727,9 +727,7 @@ void SV_RestartDecals( void )
|
||||||
SV_CreateDecal( msg, entry->position, decalIndex, entry->entityIndex, modelIndex, entry->flags, entry->scale );
|
SV_CreateDecal( msg, entry->position, decalIndex, entry->entityIndex, modelIndex, entry->flags, entry->scale );
|
||||||
}
|
}
|
||||||
|
|
||||||
Z_Free( host.decalList );
|
Z_Free( list );
|
||||||
host.decalList = NULL;
|
|
||||||
host.numdecals = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Reference in a new issue