mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 07:12:02 +00:00
- Ability to set A_VileAttack's initial attack's damage type - by BlueShadow.
This commit is contained in:
parent
b187451a71
commit
5d0369d4ed
3 changed files with 19 additions and 3 deletions
|
@ -101,15 +101,20 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_VileTarget)
|
||||||
//
|
//
|
||||||
// A_VileAttack
|
// A_VileAttack
|
||||||
//
|
//
|
||||||
|
|
||||||
|
// A_VileAttack flags
|
||||||
|
#define VAF_DMGTYPEAPPLYTODIRECT 1
|
||||||
|
|
||||||
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_VileAttack)
|
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_VileAttack)
|
||||||
{
|
{
|
||||||
ACTION_PARAM_START(6);
|
ACTION_PARAM_START(7);
|
||||||
ACTION_PARAM_SOUND(snd,0);
|
ACTION_PARAM_SOUND(snd,0);
|
||||||
ACTION_PARAM_INT(dmg,1);
|
ACTION_PARAM_INT(dmg,1);
|
||||||
ACTION_PARAM_INT(blastdmg,2);
|
ACTION_PARAM_INT(blastdmg,2);
|
||||||
ACTION_PARAM_INT(blastrad,3);
|
ACTION_PARAM_INT(blastrad,3);
|
||||||
ACTION_PARAM_FIXED(thrust,4);
|
ACTION_PARAM_FIXED(thrust,4);
|
||||||
ACTION_PARAM_NAME(dmgtype,5);
|
ACTION_PARAM_NAME(dmgtype,5);
|
||||||
|
ACTION_PARAM_INT(flags,6);
|
||||||
|
|
||||||
AActor *fire, *target;
|
AActor *fire, *target;
|
||||||
angle_t an;
|
angle_t an;
|
||||||
|
@ -123,7 +128,15 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_VileAttack)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
S_Sound (self, CHAN_WEAPON, snd, 1, ATTN_NORM);
|
S_Sound (self, CHAN_WEAPON, snd, 1, ATTN_NORM);
|
||||||
int newdam = P_DamageMobj (target, self, self, dmg, NAME_None);
|
|
||||||
|
int newdam;
|
||||||
|
|
||||||
|
if (flags & VAF_DMGTYPEAPPLYTODIRECT)
|
||||||
|
newdam = P_DamageMobj (target, self, self, dmg, dmgtype);
|
||||||
|
|
||||||
|
else
|
||||||
|
newdam = P_DamageMobj (target, self, self, dmg, NAME_None);
|
||||||
|
|
||||||
P_TraceBleed (newdam > 0 ? newdam : dmg, target);
|
P_TraceBleed (newdam > 0 ? newdam : dmg, target);
|
||||||
|
|
||||||
an = self->angle >> ANGLETOFINESHIFT;
|
an = self->angle >> ANGLETOFINESHIFT;
|
||||||
|
|
|
@ -84,7 +84,7 @@ ACTOR Actor native //: Thinker
|
||||||
action native A_VileChase();
|
action native A_VileChase();
|
||||||
action native A_VileStart();
|
action native A_VileStart();
|
||||||
action native A_VileTarget(class<Actor> fire = "ArchvileFire");
|
action native A_VileTarget(class<Actor> fire = "ArchvileFire");
|
||||||
action native A_VileAttack(sound snd = "vile/stop", int initialdmg = 20, int blastdmg = 70, int blastradius = 70, float thrustfac = 1.0, name damagetype = "Fire");
|
action native A_VileAttack(sound snd = "vile/stop", int initialdmg = 20, int blastdmg = 70, int blastradius = 70, float thrustfac = 1.0, name damagetype = "Fire", int flags = 0);
|
||||||
action native A_StartFire();
|
action native A_StartFire();
|
||||||
action native A_Fire(float spawnheight = 0);
|
action native A_Fire(float spawnheight = 0);
|
||||||
action native A_FireCrackle();
|
action native A_FireCrackle();
|
||||||
|
|
|
@ -4,6 +4,9 @@ const int PAF_NOSKULLATTACK = 1;
|
||||||
const int PAF_AIMFACING = 2;
|
const int PAF_AIMFACING = 2;
|
||||||
const int PAF_NOTARGET = 4;
|
const int PAF_NOTARGET = 4;
|
||||||
|
|
||||||
|
// Flags for A_VileAttack
|
||||||
|
const int VAF_DMGTYPEAPPLYTODIRECT = 1;
|
||||||
|
|
||||||
// Flags for A_Saw
|
// Flags for A_Saw
|
||||||
const int SF_NORANDOM = 1;
|
const int SF_NORANDOM = 1;
|
||||||
const int SF_RANDOMLIGHTMISS = 2;
|
const int SF_RANDOMLIGHTMISS = 2;
|
||||||
|
|
Loading…
Reference in a new issue