- relax pointer substitution restriction for morphed monsters.

# Conflicts:
#	src/p_mobj.cpp
This commit is contained in:
Christoph Oelckers 2020-04-19 19:03:25 +02:00 committed by drfrag
parent 896e4f6d6a
commit 11106a08b5

View file

@ -495,8 +495,12 @@ void DObject::StaticPointerSubstitution (AActor *old, AActor *notOld)
size_t changed = 0; size_t changed = 0;
int i; int i;
// This is only allowed to replace players. For everything else the results are undefined. // This is only allowed to replace players or swap out morphed monsters
if (!old->IsKindOf(NAME_PlayerPawn) || (notOld != nullptr && !notOld->IsKindOf(NAME_PlayerPawn))) return; if (!old->IsKindOf(NAME_PlayerPawn) || (notOld != nullptr && !notOld->IsKindOf(NAME_PlayerPawn)))
{
if (notOld == nullptr) return;
if (!old->IsKindOf(NAME_MorphedMonster) && !notOld->IsKindOf(NAME_MorphedMonster)) return;
}
// Go through all objects. // Go through all objects.
i = 0;DObject *last=0; i = 0;DObject *last=0;