- replaced some dyn_casts with calls to FindActor.
- fixed type checks in A_Morph.
This commit is contained in:
parent
e4d2380775
commit
0e0eca0e0f
2 changed files with 6 additions and 6 deletions
|
|
@ -714,14 +714,14 @@ DEFINE_ACTION_FUNCTION(AActor, A_Morph)
|
|||
bool res = false;
|
||||
if (self->player)
|
||||
{
|
||||
if (type->IsKindOf(RUNTIME_CLASS(APlayerPawn)))
|
||||
if (type->IsDescendantOf(RUNTIME_CLASS(APlayerPawn)))
|
||||
{
|
||||
res = P_MorphPlayer(self->player, self->player, type, duration, flags, enter_flash, exit_flash);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (type->IsKindOf(RUNTIME_CLASS(AMorphedMonster)))
|
||||
if (type->IsDescendantOf(RUNTIME_CLASS(AMorphedMonster)))
|
||||
{
|
||||
res = P_MorphMonster(self, type, duration, flags, enter_flash, exit_flash);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue