mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 07:12:16 +00:00
- Added DMSS_NOFACTOR for all A_Damage functions.
This commit is contained in:
parent
7a6e704af6
commit
5030832df0
2 changed files with 28 additions and 8 deletions
|
@ -4830,6 +4830,7 @@ enum DMSS
|
||||||
DMSS_FOILINVUL = 1,
|
DMSS_FOILINVUL = 1,
|
||||||
DMSS_AFFECTARMOR = 2,
|
DMSS_AFFECTARMOR = 2,
|
||||||
DMSS_KILL = 4,
|
DMSS_KILL = 4,
|
||||||
|
DMSS_NOFACTOR = 8,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void DoDamage(AActor *dmgtarget, AActor *self, int amount, FName DamageType, int flags)
|
static void DoDamage(AActor *dmgtarget, AActor *self, int amount, FName DamageType, int flags)
|
||||||
|
@ -4844,12 +4845,26 @@ static void DoDamage(AActor *dmgtarget, AActor *self, int amount, FName DamageTy
|
||||||
}
|
}
|
||||||
if (flags & DMSS_AFFECTARMOR)
|
if (flags & DMSS_AFFECTARMOR)
|
||||||
{
|
{
|
||||||
P_DamageMobj(dmgtarget, self, self, amount, DamageType, DMG_FOILINVUL);
|
if (flags & DMSS_NOFACTOR)
|
||||||
|
{
|
||||||
|
P_DamageMobj(dmgtarget, self, self, amount, DamageType, DMG_FOILINVUL | DMG_NO_FACTOR);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
P_DamageMobj(dmgtarget, self, self, amount, DamageType, DMG_FOILINVUL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (flags & DMSS_NOFACTOR)
|
||||||
|
{
|
||||||
|
P_DamageMobj(dmgtarget, self, self, amount, DamageType, DMG_FOILINVUL | DMG_NO_ARMOR | DMG_NO_FACTOR);
|
||||||
|
}
|
||||||
//[MC] DMG_FOILINVUL is needed for making the damage occur on the actor.
|
//[MC] DMG_FOILINVUL is needed for making the damage occur on the actor.
|
||||||
P_DamageMobj(dmgtarget, self, self, amount, DamageType, DMG_FOILINVUL | DMG_NO_ARMOR);
|
else
|
||||||
|
{
|
||||||
|
P_DamageMobj(dmgtarget, self, self, amount, DamageType, DMG_FOILINVUL | DMG_NO_ARMOR);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5128,11 +5143,13 @@ static void DoRemove(AActor *removetarget, int flags)
|
||||||
// A_RemoveTarget
|
// A_RemoveTarget
|
||||||
//
|
//
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
DEFINE_ACTION_FUNCTION(AActor, A_RemoveTarget)
|
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_RemoveTarget)
|
||||||
{
|
{
|
||||||
if ((self->target != NULL))
|
ACTION_PARAM_START(1);
|
||||||
|
ACTION_PARAM_INT(flags, 0);
|
||||||
|
if (self->master != NULL)
|
||||||
{
|
{
|
||||||
P_RemoveThing(self->target);
|
DoRemove(self->target, flags);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5141,11 +5158,13 @@ DEFINE_ACTION_FUNCTION(AActor, A_RemoveTarget)
|
||||||
// A_RemoveTracer
|
// A_RemoveTracer
|
||||||
//
|
//
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
DEFINE_ACTION_FUNCTION(AActor, A_RemoveTracer)
|
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_RemoveTracer)
|
||||||
{
|
{
|
||||||
if ((self->tracer != NULL))
|
ACTION_PARAM_START(1);
|
||||||
|
ACTION_PARAM_INT(flags, 0);
|
||||||
|
if (self->master != NULL)
|
||||||
{
|
{
|
||||||
P_RemoveThing(self->tracer);
|
DoRemove(self->tracer, flags);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -375,6 +375,7 @@ const int KILS_NOMONSTERS = 4;
|
||||||
const int DMSS_FOILINVUL = 1;
|
const int DMSS_FOILINVUL = 1;
|
||||||
const int DMSS_AFFECTARMOR = 2;
|
const int DMSS_AFFECTARMOR = 2;
|
||||||
const int DMSS_KILL = 4;
|
const int DMSS_KILL = 4;
|
||||||
|
const int DMSS_NOFACTOR = 8;
|
||||||
|
|
||||||
// Flags for A_AlertMonsters
|
// Flags for A_AlertMonsters
|
||||||
const int AMF_TARGETEMITTER = 1;
|
const int AMF_TARGETEMITTER = 1;
|
||||||
|
|
Loading…
Reference in a new issue