Skip to content

Commit

Permalink
Enable ILocomotion interface (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kenzzer authored Oct 12, 2024
1 parent 9aead65 commit ec041bf
Show file tree
Hide file tree
Showing 6 changed files with 558 additions and 54 deletions.
4 changes: 2 additions & 2 deletions extension/sourcesdk/NextBot/NextBotInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ INextBot::~INextBot()
if (m_IntentionInterface)
delete m_IntentionInterface;

/*if (m_LocoInterface)
delete m_LocoInterface;*/
if (m_LocoInterface)
delete m_LocoInterface;

if (m_BodyInterface)
delete m_BodyInterface;
Expand Down
7 changes: 4 additions & 3 deletions extension/sourcesdk/NextBot/NextBotInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "NextBotDebug.h"
#include "NextBotBodyInterface.h"
#include "NextBotIntentionInterface.h"
#include "NextBotLocomotionInterface.h"
#include "sourcesdk/tracefilter_simple.h"
#include "sourcesdk/basecombatcharacter.h"
#include <enginecallback.h>
Expand Down Expand Up @@ -51,7 +52,7 @@ class INextBot : public INextBotEventResponder
virtual CBaseCombatCharacter* GetEntity() const = 0;
virtual NextBotCombatCharacter *GetNextBotCombatCharacter() const { return nullptr; };

virtual ILocomotion *GetLocomotionInterface() const = 0;
virtual ILocomotion *GetLocomotionInterface() const;
virtual IBody *GetBodyInterface() const;
virtual IIntention *GetIntentionInterface() const;
virtual IVision *GetVisionInterface() const = 0;
Expand Down Expand Up @@ -189,15 +190,15 @@ inline void INextBot::NotifyPathDestruction( const PathFollower *path )
m_CurrentPath = nullptr;
}

/*inline ILocomotion *INextBot::GetLocomotionInterface( void ) const
inline ILocomotion *INextBot::GetLocomotionInterface( void ) const
{
if ( m_LocoInterface == nullptr )
{
m_LocoInterface = new ILocomotion( const_cast< INextBot * >( this ) );
}

return m_LocoInterface;
}*/
}

inline IBody *INextBot::GetBodyInterface( void ) const
{
Expand Down
Loading

0 comments on commit ec041bf

Please sign in to comment.