- reviewed and sorted out the remaining parts of g_shared

This commit is contained in:
Christoph Oelckers 2019-01-31 02:27:54 +01:00
commit 25d5b788f5
6 changed files with 333 additions and 68 deletions

View file

@ -32,6 +32,8 @@
#include "vm.h"
#include "actorinlines.h"
EXTERN_CVAR(Int, sv_corpsequeuesize)
//----------------------------------------------------------------------------
//
// PROC A_NoBlocking
@ -88,25 +90,6 @@ void A_Unblock(AActor *self, bool drop)
//
//----------------------------------------------------------------------------
CUSTOM_CVAR(Int, sv_corpsequeuesize, 64, CVAR_ARCHIVE|CVAR_SERVERINFO)
{
if (self > 0)
{
for (auto Level : AllLevels())
{
auto &corpsequeue = Level->CorpseQueue;
while (corpsequeue.Size() > (unsigned)self)
{
AActor *corpse = corpsequeue[0];
if (corpse) corpse->Destroy();
corpsequeue.Delete(0);
}
}
}
}
// throw another corpse on the queue
DEFINE_ACTION_FUNCTION(AActor, A_QueueCorpse)
{