- optimized the FName versions of IsDescendantOf and IsKindOf. These can be done without first looking up the class type itself.
This commit is contained in:
parent
31223ca180
commit
a6785afddb
28 changed files with 126 additions and 97 deletions
|
|
@ -337,7 +337,7 @@ bool P_UndoPlayerMorph (player_t *activator, player_t *player, int unmorphflag,
|
|||
if (correctweapon)
|
||||
{ // Better "lose morphed weapon" semantics
|
||||
PClassActor *morphweapon = PClass::FindActor(pmo->MorphWeapon);
|
||||
if (morphweapon != nullptr && morphweapon->IsDescendantOf(RUNTIME_CLASS(AWeapon)))
|
||||
if (morphweapon != nullptr && morphweapon->IsDescendantOf(NAME_Weapon))
|
||||
{
|
||||
AWeapon *OriginalMorphWeapon = static_cast<AWeapon *>(mo->FindInventory (morphweapon));
|
||||
if ((OriginalMorphWeapon != nullptr) && (OriginalMorphWeapon->GivenAsMorphWeapon))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue