mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-15 08:41:59 +00:00
- Added CPF_NOTURN flag for A_CustomPunch.
This commit is contained in:
parent
e0eca1e0f5
commit
fd354dbe9a
2 changed files with 10 additions and 5 deletions
|
@ -1384,6 +1384,7 @@ enum
|
||||||
CPF_DAGGER = 2,
|
CPF_DAGGER = 2,
|
||||||
CPF_PULLIN = 4,
|
CPF_PULLIN = 4,
|
||||||
CPF_NORANDOMPUFFZ = 8,
|
CPF_NORANDOMPUFFZ = 8,
|
||||||
|
CPF_NOTURN = 16,
|
||||||
};
|
};
|
||||||
|
|
||||||
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomPunch)
|
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomPunch)
|
||||||
|
@ -1424,7 +1425,6 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomPunch)
|
||||||
|
|
||||||
P_LineAttack (self, angle, Range, pitch, Damage, NAME_Melee, PuffType, puffFlags, &linetarget, &actualdamage);
|
P_LineAttack (self, angle, Range, pitch, Damage, NAME_Melee, PuffType, puffFlags, &linetarget, &actualdamage);
|
||||||
|
|
||||||
// turn to face target
|
|
||||||
if (linetarget)
|
if (linetarget)
|
||||||
{
|
{
|
||||||
if (LifeSteal && !(linetarget->flags5 & MF5_DONTDRAIN))
|
if (LifeSteal && !(linetarget->flags5 & MF5_DONTDRAIN))
|
||||||
|
@ -1435,10 +1435,14 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomPunch)
|
||||||
S_Sound (self, CHAN_WEAPON, weapon->AttackSound, 1, ATTN_NORM);
|
S_Sound (self, CHAN_WEAPON, weapon->AttackSound, 1, ATTN_NORM);
|
||||||
}
|
}
|
||||||
|
|
||||||
self->angle = R_PointToAngle2 (self->x,
|
if (!(flags & CPF_NOTURN))
|
||||||
self->y,
|
{
|
||||||
linetarget->x,
|
// turn to face target
|
||||||
linetarget->y);
|
self->angle = R_PointToAngle2 (self->x,
|
||||||
|
self->y,
|
||||||
|
linetarget->x,
|
||||||
|
linetarget->y);
|
||||||
|
}
|
||||||
|
|
||||||
if (flags & CPF_PULLIN) self->flags |= MF_JUSTATTACKED;
|
if (flags & CPF_PULLIN) self->flags |= MF_JUSTATTACKED;
|
||||||
if (flags & CPF_DAGGER) P_DaggerAlert (self, linetarget);
|
if (flags & CPF_DAGGER) P_DaggerAlert (self, linetarget);
|
||||||
|
|
|
@ -175,6 +175,7 @@ const int CPF_USEAMMO = 1;
|
||||||
const int CPF_DAGGER = 2;
|
const int CPF_DAGGER = 2;
|
||||||
const int CPF_PULLIN = 4;
|
const int CPF_PULLIN = 4;
|
||||||
const int CPF_NORANDOMPUFFZ = 8;
|
const int CPF_NORANDOMPUFFZ = 8;
|
||||||
|
const int CPF_NOTURN = 16;
|
||||||
|
|
||||||
// Flags for A_CustomMissile
|
// Flags for A_CustomMissile
|
||||||
const int FPF_AIMATANGLE = 1;
|
const int FPF_AIMATANGLE = 1;
|
||||||
|
|
Loading…
Reference in a new issue