mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-01-18 22:51:39 +00:00
- relax pointer substitution restriction for morphed monsters.
# Conflicts: # src/p_mobj.cpp
This commit is contained in:
parent
896e4f6d6a
commit
11106a08b5
1 changed files with 6 additions and 2 deletions
|
@ -495,8 +495,12 @@ void DObject::StaticPointerSubstitution (AActor *old, AActor *notOld)
|
|||
size_t changed = 0;
|
||||
int i;
|
||||
|
||||
// This is only allowed to replace players. For everything else the results are undefined.
|
||||
if (!old->IsKindOf(NAME_PlayerPawn) || (notOld != nullptr && !notOld->IsKindOf(NAME_PlayerPawn))) return;
|
||||
// This is only allowed to replace players or swap out morphed monsters
|
||||
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.
|
||||
i = 0;DObject *last=0;
|
||||
|
|
Loading…
Reference in a new issue