diff --git a/src/thingdef/thingdef_codeptr.cpp b/src/thingdef/thingdef_codeptr.cpp index a34a2f8d6..a668e589b 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -1384,6 +1384,7 @@ enum CPF_DAGGER = 2, CPF_PULLIN = 4, CPF_NORANDOMPUFFZ = 8, + CPF_NOTURN = 16, }; 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); - // turn to face target if (linetarget) { 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); } - self->angle = R_PointToAngle2 (self->x, - self->y, - linetarget->x, - linetarget->y); + if (!(flags & CPF_NOTURN)) + { + // turn to face target + self->angle = R_PointToAngle2 (self->x, + self->y, + linetarget->x, + linetarget->y); + } if (flags & CPF_PULLIN) self->flags |= MF_JUSTATTACKED; if (flags & CPF_DAGGER) P_DaggerAlert (self, linetarget); diff --git a/wadsrc/static/actors/constants.txt b/wadsrc/static/actors/constants.txt index 8baf2e65c..d9da11b2d 100644 --- a/wadsrc/static/actors/constants.txt +++ b/wadsrc/static/actors/constants.txt @@ -175,6 +175,7 @@ const int CPF_USEAMMO = 1; const int CPF_DAGGER = 2; const int CPF_PULLIN = 4; const int CPF_NORANDOMPUFFZ = 8; +const int CPF_NOTURN = 16; // Flags for A_CustomMissile const int FPF_AIMATANGLE = 1;