Skip to content

Commit 3d5212c

Browse files
committed
Nextbots sense weapon sounds from traditional NPCs
1 parent 6239f96 commit 3d5212c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/game/server/ai_basenpc.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@
103103
#include "hl2mp_gamerules.h"
104104
#include "hl2mp_player_resource.h"
105105
#endif
106+
#ifdef NEXT_BOT
107+
#include "NextBot.h"
108+
#endif
106109
#endif
107110

108111
#ifdef MAPBASE_VSCRIPT
@@ -1908,6 +1911,11 @@ void CAI_BaseNPC::MakeTracer( const Vector &vecTracerSrc, const trace_t &tr, int
19081911
//-----------------------------------------------------------------------------
19091912
void CAI_BaseNPC::FireBullets( const FireBulletsInfo_t &info )
19101913
{
1914+
#if defined(MAPBASE) && defined(NEXT_BOT)
1915+
if ( GetActiveWeapon() )
1916+
TheNextBots().OnWeaponFired( this, GetActiveWeapon() );
1917+
#endif
1918+
19111919
#ifdef HL2_DLL
19121920
// If we're shooting at a bullseye, become perfectly accurate if the bullseye demands it
19131921
if ( GetEnemy() && GetEnemy()->Classify() == CLASS_BULLSEYE )

0 commit comments

Comments
 (0)