mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 23:11:58 +00:00
Merge branch 'cpf_noturn' of https://github.com/edward-san/zdoom
This commit is contained in:
commit
23bb12b0b8
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!(flags & CPF_NOTURN))
|
||||||
|
{
|
||||||
|
// turn to face target
|
||||||
self->angle = R_PointToAngle2 (self->x,
|
self->angle = R_PointToAngle2 (self->x,
|
||||||
self->y,
|
self->y,
|
||||||
linetarget->x,
|
linetarget->x,
|
||||||
linetarget->y);
|
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