Skip to content

Commit

Permalink
engine: server: stub SV_RestartDecals for dedicated server
Browse files Browse the repository at this point in the history
  • Loading branch information
a1batross committed Oct 3, 2024
1 parent e11635d commit 882d8af
Showing 1 changed file with 10 additions and 15 deletions.
25 changes: 10 additions & 15 deletions engine/server/sv_game.c
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ void SV_RestartAmbientSounds( void )
{
SV_StartMusic( curtrack, looptrack, position );
}
#endif
#endif // !XASH_DEDICATED
}

/*
Expand All @@ -684,31 +684,25 @@ Write all the decals into demo
*/
void SV_RestartDecals( void )
{
// TODO: similar to SV_RestartAmbientSounds, this is only used for demo recording
// and better be reimplemented on client side
#if !XASH_DEDICATED
decallist_t *list;
int decalIndex;
int modelIndex;
sizebuf_t *msg;
int i, numdecals;

if( !SV_Active( )) return;
if( !SV_Active( ) || Host_IsDedicated( ))
return;

// g-cont. add space for studiodecals if present
list = (decallist_t *)Z_Calloc( sizeof( decallist_t ) * MAX_RENDER_DECALS * 2 );

#if !XASH_DEDICATED
if( !Host_IsDedicated() )
{
numdecals = ref.dllFuncs.R_CreateDecalList( list );
numdecals = ref.dllFuncs.R_CreateDecalList( list );

// remove decals from map
ref.dllFuncs.R_ClearAllDecals();
}
else
#endif // XASH_DEDICATED
{
// we probably running a dedicated server
numdecals = 0;
}
// remove decals from map
ref.dllFuncs.R_ClearAllDecals();

// write decals into reliable datagram
msg = SV_GetReliableDatagram();
Expand All @@ -731,6 +725,7 @@ void SV_RestartDecals( void )
}

Z_Free( list );
#endif // !XASH_DEDICATED
}

/*
Expand Down

0 comments on commit 882d8af

Please sign in to comment.