- Give actors modified via Dehacked than CANUSEWALLS flag, whether they look like monsters

at first glance or not.

SVN r3386 (trunk)
This commit is contained in:
Randy Heit 2012-02-23 03:24:13 +00:00
parent 22dfc82338
commit 77a4b9a29b
2 changed files with 8 additions and 2 deletions

View file

@ -1194,15 +1194,21 @@ static int PatchThing (int thingy)
PushTouchedActor(const_cast<PClass *>(type));
}
// Make MF3_ISMONSTER match MF_COUNTKILL
// If MF_COUNTKILL is set, make sure the other standard monster flags are
// set, too. And vice versa.
if (info->flags & MF_COUNTKILL)
{
info->flags2 |= MF2_PUSHWALL | MF2_MCROSS | MF2_PASSMOBJ;
info->flags3 |= MF3_ISMONSTER;
}
else
{
info->flags2 &= ~(MF2_PUSHWALL | MF2_MCROSS);
info->flags3 &= ~MF3_ISMONSTER;
}
// Everything that's altered here gets the CANUSEWALLS flag, just in case
// it calls P_Move().
info->flags4 |= MF4_CANUSEWALLS;
if (patchedStates)
{
statedef.InstallStates(type->ActorInfo, info);

View file

@ -313,7 +313,7 @@ bool P_TestActivateLine (line_t *line, AActor *mo, int side, int activationType)
{
lineActivation |= SPAC_Cross|SPAC_MCross;
}
if (activationType ==SPAC_Use || activationType == SPAC_UseBack)
if (activationType == SPAC_Use || activationType == SPAC_UseBack)
{
if (!P_CheckSwitchRange(mo, line, side))
{