- reviewed and sorted out the remaining parts of g_shared
This commit is contained in:
parent
0b4862480e
commit
25d5b788f5
6 changed files with 333 additions and 68 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue