- re-fixed the massacre fix for Dehacked-modified inventory items.

Instead of overriding the Massacre method it is preferable to clear the flags causing the bad behavior, most notably ISMONSTER.

# Conflicts:
#	src/g_inventory/a_pickups.cpp
#	src/g_inventory/a_pickups.h
This commit is contained in:
Christoph Oelckers 2018-11-27 00:14:51 +01:00
commit a14b0c58bf
6 changed files with 8 additions and 31 deletions

View file

@ -52,6 +52,7 @@
#include "teaminfo.h"
#include "p_conversation.h"
#include "d_event.h"
#include "p_enemy.h"
#include "m_argv.h"
#include "p_lnspec.h"
#include "p_spec.h"
@ -2079,19 +2080,7 @@ uint8_t *FDynamicBuffer::GetData (int *len)
static int KillAll(PClassActor *cls)
{
AActor *actor;
int killcount = 0;
TThinkerIterator<AActor> iterator(cls);
while ( (actor = iterator.Next ()) )
{
if (actor->IsA(cls))
{
if (!(actor->flags2 & MF2_DORMANT) && (actor->flags3 & MF3_ISMONSTER))
killcount += actor->Massacre ();
}
}
return killcount;
return P_Massacre(false, cls);
}
static int RemoveClass(const PClass *cls)