mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-25 05:31:00 +00:00
- relax pointer substitution restriction for morphed monsters.
This commit is contained in:
parent
0eb68177ca
commit
88d5bf6877
1 changed files with 6 additions and 3 deletions
|
@ -4943,9 +4943,12 @@ void StaticPointerSubstitution(AActor* old, AActor* notOld)
|
||||||
|
|
||||||
if (old == nullptr) return;
|
if (old == nullptr) return;
|
||||||
|
|
||||||
// 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;
|
||||||
for (probe = GC::Root; probe != NULL; probe = probe->ObjNext)
|
for (probe = GC::Root; probe != NULL; probe = probe->ObjNext)
|
||||||
|
|
Loading…
Reference in a new issue