- removed an assert from APowerMorph::EndEffect. With some recent changes to DestroyAllInventory it appears that the asserted condition no longer is true at this point when ending a game.
- fixed: When replacing a tentative class, the pointers in the morph objects were not replaced. Instead of adding more ReplaceClassRef methods I chose to integrate this part into the PointerSubstitution mechanism and delete ReplaceClassRef entirely. The code had some oversights anyway that would have caused problems, now that non-actors can be created.
This commit is contained in:
parent
0233c21e33
commit
87484950cf
20 changed files with 72 additions and 132 deletions
|
|
@ -74,8 +74,6 @@
|
|||
#include "a_health.h"
|
||||
#include "a_keys.h"
|
||||
|
||||
extern TArray<PClassActor **> OptionalClassPtrs;
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// Gets a class pointer and performs an error check for correct type
|
||||
|
|
@ -2998,7 +2996,6 @@ DEFINE_CLASS_PROPERTY(playerclass, S, MorphProjectile)
|
|||
{
|
||||
PROP_STRING_PARM(str, 0);
|
||||
defaults->PlayerClass = FindClassTentativePlayerPawn(str, bag.fromDecorate);
|
||||
if (bag.fromDecorate) OptionalClassPtrs.Push((PClassActor**)&defaults->PlayerClass);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
@ -3008,7 +3005,6 @@ DEFINE_CLASS_PROPERTY(monsterclass, S, MorphProjectile)
|
|||
{
|
||||
PROP_STRING_PARM(str, 0);
|
||||
defaults->MonsterClass = FindClassTentative(str, RUNTIME_CLASS(AActor), bag.fromDecorate);
|
||||
if (bag.fromDecorate) OptionalClassPtrs.Push(&defaults->MonsterClass);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
@ -3036,7 +3032,6 @@ DEFINE_CLASS_PROPERTY(morphflash, S, MorphProjectile)
|
|||
{
|
||||
PROP_STRING_PARM(str, 0);
|
||||
defaults->MorphFlash = FindClassTentative(str, RUNTIME_CLASS(AActor), bag.fromDecorate);
|
||||
if (bag.fromDecorate) OptionalClassPtrs.Push(&defaults->MorphFlash);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
@ -3046,7 +3041,6 @@ DEFINE_CLASS_PROPERTY(unmorphflash, S, MorphProjectile)
|
|||
{
|
||||
PROP_STRING_PARM(str, 0);
|
||||
defaults->UnMorphFlash = FindClassTentative(str, RUNTIME_CLASS(AActor), bag.fromDecorate);
|
||||
if (bag.fromDecorate) OptionalClassPtrs.Push(&defaults->UnMorphFlash);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
@ -3056,7 +3050,6 @@ DEFINE_CLASS_PROPERTY(playerclass, S, PowerMorph)
|
|||
{
|
||||
PROP_STRING_PARM(str, 0);
|
||||
defaults->PlayerClass = FindClassTentativePlayerPawn(str, bag.fromDecorate);
|
||||
if (bag.fromDecorate) OptionalClassPtrs.Push((PClassActor**)&defaults->PlayerClass);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
@ -3075,7 +3068,6 @@ DEFINE_CLASS_PROPERTY(morphflash, S, PowerMorph)
|
|||
{
|
||||
PROP_STRING_PARM(str, 0);
|
||||
defaults->MorphFlash = FindClassTentative(str, RUNTIME_CLASS(AActor), bag.fromDecorate);
|
||||
if (bag.fromDecorate) OptionalClassPtrs.Push(&defaults->MorphFlash);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
@ -3085,7 +3077,6 @@ DEFINE_CLASS_PROPERTY(unmorphflash, S, PowerMorph)
|
|||
{
|
||||
PROP_STRING_PARM(str, 0);
|
||||
defaults->UnMorphFlash = FindClassTentative(str, RUNTIME_CLASS(AActor), bag.fromDecorate);
|
||||
if (bag.fromDecorate) OptionalClassPtrs.Push(&defaults->UnMorphFlash);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue