Skip to content

Commit ec041bf

Browse files
authored
Enable ILocomotion interface (#58)
1 parent 9aead65 commit ec041bf

File tree

6 files changed

+558
-54
lines changed

6 files changed

+558
-54
lines changed

extension/sourcesdk/NextBot/NextBotInterface.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ INextBot::~INextBot()
3939
if (m_IntentionInterface)
4040
delete m_IntentionInterface;
4141

42-
/*if (m_LocoInterface)
43-
delete m_LocoInterface;*/
42+
if (m_LocoInterface)
43+
delete m_LocoInterface;
4444

4545
if (m_BodyInterface)
4646
delete m_BodyInterface;

extension/sourcesdk/NextBot/NextBotInterface.h

+4-3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include "NextBotDebug.h"
99
#include "NextBotBodyInterface.h"
1010
#include "NextBotIntentionInterface.h"
11+
#include "NextBotLocomotionInterface.h"
1112
#include "sourcesdk/tracefilter_simple.h"
1213
#include "sourcesdk/basecombatcharacter.h"
1314
#include <enginecallback.h>
@@ -51,7 +52,7 @@ class INextBot : public INextBotEventResponder
5152
virtual CBaseCombatCharacter* GetEntity() const = 0;
5253
virtual NextBotCombatCharacter *GetNextBotCombatCharacter() const { return nullptr; };
5354

54-
virtual ILocomotion *GetLocomotionInterface() const = 0;
55+
virtual ILocomotion *GetLocomotionInterface() const;
5556
virtual IBody *GetBodyInterface() const;
5657
virtual IIntention *GetIntentionInterface() const;
5758
virtual IVision *GetVisionInterface() const = 0;
@@ -189,15 +190,15 @@ inline void INextBot::NotifyPathDestruction( const PathFollower *path )
189190
m_CurrentPath = nullptr;
190191
}
191192

192-
/*inline ILocomotion *INextBot::GetLocomotionInterface( void ) const
193+
inline ILocomotion *INextBot::GetLocomotionInterface( void ) const
193194
{
194195
if ( m_LocoInterface == nullptr )
195196
{
196197
m_LocoInterface = new ILocomotion( const_cast< INextBot * >( this ) );
197198
}
198199

199200
return m_LocoInterface;
200-
}*/
201+
}
201202

202203
inline IBody *INextBot::GetBodyInterface( void ) const
203204
{

0 commit comments

Comments
 (0)