Merge branch 'scripting'
Conflicts: src/actor.h src/g_doom/a_doomweaps.cpp src/g_hexen/a_blastradius.cpp src/p_enemy.cpp src/p_enemy.h src/thingdef/thingdef.h src/thingdef/thingdef_codeptr.cpp wadsrc/static/actors/constants.txt
This commit is contained in:
commit
b3b0886b64
230 changed files with 24061 additions and 8641 deletions
|
|
@ -369,9 +369,9 @@ void APowerInvulnerable::InitEffect ()
|
|||
Super::InitEffect();
|
||||
Owner->effects &= ~FX_RESPAWNINVUL;
|
||||
Owner->flags2 |= MF2_INVULNERABLE;
|
||||
if (Mode == NAME_None)
|
||||
if (Mode == NAME_None && Owner->IsKindOf(RUNTIME_CLASS(APlayerPawn)))
|
||||
{
|
||||
Mode = (ENamedName)RUNTIME_TYPE(Owner)->Meta.GetMetaInt(APMETA_InvulMode);
|
||||
Mode = static_cast<PClassPlayerPawn *>(Owner->GetClass())->InvulMode;
|
||||
}
|
||||
if (Mode == NAME_Reflective)
|
||||
{
|
||||
|
|
@ -1619,8 +1619,8 @@ void APowerDamage::ModifyDamage(int damage, FName damageType, int &newdamage, bo
|
|||
static const fixed_t def = 4*FRACUNIT;
|
||||
if (!passive && damage > 0)
|
||||
{
|
||||
const fixed_t * pdf = NULL;
|
||||
DmgFactors * df = GetClass()->ActorInfo->DamageFactors;
|
||||
const fixed_t *pdf = NULL;
|
||||
DmgFactors *df = GetClass()->DamageFactors;
|
||||
if (df != NULL && df->CountUsed() != 0)
|
||||
{
|
||||
pdf = df->CheckFactor(damageType);
|
||||
|
|
@ -1700,7 +1700,7 @@ void APowerProtection::ModifyDamage(int damage, FName damageType, int &newdamage
|
|||
if (passive && damage > 0)
|
||||
{
|
||||
const fixed_t *pdf = NULL;
|
||||
DmgFactors *df = GetClass()->ActorInfo->DamageFactors;
|
||||
DmgFactors *df = GetClass()->DamageFactors;
|
||||
if (df != NULL && df->CountUsed() != 0)
|
||||
{
|
||||
pdf = df->CheckFactor(damageType);
|
||||
|
|
@ -1887,9 +1887,9 @@ void APowerMorph::InitEffect( )
|
|||
if (Owner != NULL && Owner->player != NULL && PlayerClass != NAME_None)
|
||||
{
|
||||
player_t *realplayer = Owner->player; // Remember the identity of the player
|
||||
const PClass *morph_flash = PClass::FindClass (MorphFlash);
|
||||
const PClass *unmorph_flash = PClass::FindClass (UnMorphFlash);
|
||||
const PClass *player_class = PClass::FindClass (PlayerClass);
|
||||
PClassActor *morph_flash = PClass::FindActor(MorphFlash);
|
||||
PClassActor *unmorph_flash = PClass::FindActor(UnMorphFlash);
|
||||
PClassPlayerPawn *player_class = dyn_cast<PClassPlayerPawn>(PClass::FindClass (PlayerClass));
|
||||
if (P_MorphPlayer(realplayer, realplayer, player_class, -1/*INDEFINITELY*/, MorphStyle, morph_flash, unmorph_flash))
|
||||
{
|
||||
Owner = realplayer->mo; // Replace the new owner in our owner; safe because we are not attached to anything yet
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue