From d7d022144e10bd0ff447b5d1f7533646c69be9b4 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Tue, 23 Dec 2014 21:30:24 -0600 Subject: [PATCH] Call A_Face() directly from A_CustomBullletAttack --- src/p_enemy.h | 5 ++--- src/thingdef/thingdef_codeptr.cpp | 4 +--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/p_enemy.h b/src/p_enemy.h index 8c5516eadc..f5cc387dd9 100644 --- a/src/p_enemy.h +++ b/src/p_enemy.h @@ -72,9 +72,8 @@ DECLARE_ACTION(A_FreezeDeathChunks) DECLARE_ACTION(A_BossDeath) void A_Chase(AActor *self); -void A_FaceTarget (AActor *actor, angle_t max_turn = 0, angle_t max_pitch = ANGLE_270); -void A_FaceMaster(AActor *actor, angle_t max_turn = 0, angle_t max_pitch = ANGLE_270); -void A_FaceTracer(AActor *actor, angle_t max_turn = 0, angle_t max_pitch = ANGLE_270); +void A_FaceTarget(AActor *actor, angle_t max_turn = 0, angle_t max_pitch = ANGLE_270); +void A_Face(AActor *self, AActor *other, angle_t max_turn = 0, angle_t max_pitch = ANGLE_270); bool A_RaiseMobj (AActor *, fixed_t speed); bool A_SinkMobj (AActor *, fixed_t speed); diff --git a/src/thingdef/thingdef_codeptr.cpp b/src/thingdef/thingdef_codeptr.cpp index 0f37efa185..9fdc14a283 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -1082,9 +1082,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomBulletAttack) { if (!(Flags & CBAF_AIMFACING)) { - if (ref == self->target) A_FaceTarget(self); - else if (ref == self->master) A_FaceMaster(self); - else if (ref == self->tracer) A_FaceTracer(self); + A_Face(self, ref); } bangle = self->angle;