From 49aaf9b451c6eae76842f1567f312fa57b9b5112 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Thu, 22 Mar 2012 21:40:26 +0000 Subject: [PATCH] - Added A_ClearLastHeard action function. SVN r3464 (trunk) --- src/p_enemy.cpp | 11 +++++++++++ wadsrc/static/actors/actor.txt | 1 + 2 files changed, 12 insertions(+) diff --git a/src/p_enemy.cpp b/src/p_enemy.cpp index 55787c650..5cb1ce673 100644 --- a/src/p_enemy.cpp +++ b/src/p_enemy.cpp @@ -2008,6 +2008,17 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_LookEx) // [KS] *** End additions by me *** +//========================================================================== +// +// A_ClearLastHeard +// +//========================================================================== + +DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_ClearLastHeard) +{ + self->LastHeard = NULL; +} + //========================================================================== // // A_Wander diff --git a/wadsrc/static/actors/actor.txt b/wadsrc/static/actors/actor.txt index 1bc7f53a9..f48aeacc8 100644 --- a/wadsrc/static/actors/actor.txt +++ b/wadsrc/static/actors/actor.txt @@ -260,6 +260,7 @@ ACTOR Actor native //: Thinker action native A_QueueCorpse(); action native A_DeQueueCorpse(); action native A_LookEx(int flags = 0, float minseedist = 0, float maxseedist = 0, float maxheardist = 0, float fov = 0, state label = ""); + action native A_ClearLastHeard(); action native A_ClearTarget(); action native A_JumpIfTargetInLOS (state label, float fov = 0, int flags = 0, float dist_max = 0, float dist_close = 0); action native A_JumpIfInTargetLOS (state label, float fov = 0, int flags = 0, float dist_max = 0, float dist_close = 0);