Skip to content

Commit fe72581

Browse files
committed
implement #743
1 parent 6510690 commit fe72581

16 files changed

+1660
-37
lines changed

src/game/server/NextBot/NextBotComponentInterface.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,14 @@ HSCRIPT INextBotComponent::GetScriptInstance()
4242
}
4343

4444
//--------------------------------------------------------------------------------------------------------------
45+
#ifndef BDSBASE
4546
#ifdef TF_DLL
4647
DEFINE_SCRIPT_INSTANCE_HELPER( INextBotComponent, &g_NextBotComponentScriptInstanceHelper )
4748
#endif
49+
#else
50+
DEFINE_SCRIPT_INSTANCE_HELPER(INextBotComponent, &g_NextBotComponentScriptInstanceHelper)
51+
#endif
52+
4853
BEGIN_ENT_SCRIPTDESC_ROOT( INextBotComponent, "Next bot component" )
4954
DEFINE_SCRIPTFUNC( Reset, "Resets the internal update state" )
5055
DEFINE_SCRIPTFUNC( ComputeUpdateInterval, "Recomputes the component update interval" )

src/game/server/NextBot/NextBotLocomotionInterface.h

+17
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,22 @@
77
#define _NEXT_BOT_LOCOMOTION_INTERFACE_H_
88

99
#include "NextBotComponentInterface.h"
10+
#ifdef BDSBASE
11+
#ifdef USE_NAV_MESH
12+
#include "nav_area.h"
13+
#else
14+
15+
inline HSCRIPT ToHScript(CNavArea* pArea)
16+
{
17+
return NULL;
18+
}
19+
20+
inline CNavArea* ToNavArea(HSCRIPT hScript)
21+
{
22+
return NULL;
23+
}
24+
#endif
25+
#else
1026
#ifdef TF_DLL
1127
#include "tf/nav_mesh/tf_nav_area.h"
1228
#else
@@ -27,6 +43,7 @@ inline CNavArea *ToNavArea( HSCRIPT hScript )
2743
return NULL;
2844
}
2945
#endif
46+
#endif
3047

3148
class Path;
3249
class INextBot;

src/game/server/basecombatcharacter.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,11 @@
3939
#include "saverestoretypes.h"
4040
#include "nav_mesh.h"
4141

42+
#ifndef BDSBASE
4243
#ifdef TF_DLL
4344
#include "nav_mesh/tf_nav_area.h"
4445
#endif
46+
#endif
4547

4648
#ifdef NEXT_BOT
4749
#include "NextBot/NextBotManager.h"
@@ -3622,11 +3624,15 @@ float CBaseCombatCharacter::GetTimeSinceLastInjury( int team /*= TEAM_ANY */ ) c
36223624
//-----------------------------------------------------------------------------
36233625
HSCRIPT CBaseCombatCharacter::ScriptGetLastKnownArea( void ) const
36243626
{
3627+
#ifndef BDSBASE
36253628
#ifdef TF_DLL
36263629
return ToHScript( GetLastKnownArea() );
36273630
#else
36283631
return NULL;
36293632
#endif
3633+
#else
3634+
return ToHScript(GetLastKnownArea());
3635+
#endif
36303636
}
36313637

36323638
BEGIN_ENT_SCRIPTDESC( CBaseCombatCharacter, CBaseFlex, "Base combat characters." )

0 commit comments

Comments
 (0)