diff --git a/extension/sourcesdk/NextBot/NextBotComponentInterface.cpp b/extension/sourcesdk/NextBot/NextBotComponentInterface.cpp index 5f06230..58cba6f 100644 --- a/extension/sourcesdk/NextBot/NextBotComponentInterface.cpp +++ b/extension/sourcesdk/NextBot/NextBotComponentInterface.cpp @@ -22,6 +22,10 @@ bool INextBotComponent::Init(SourceMod::IGameConfig* config, char* error, size_t INextBotComponent::INextBotComponent(INextBot *bot) { +#if SOURCE_ENGINE == SE_TF2 + m_scriptInstance = 0; +#endif + m_curInterval = TICK_INTERVAL; m_lastUpdateTime = 0; m_bot = bot; diff --git a/extension/sourcesdk/NextBot/NextBotComponentInterface.h b/extension/sourcesdk/NextBot/NextBotComponentInterface.h index 325af3c..7f6962e 100644 --- a/extension/sourcesdk/NextBot/NextBotComponentInterface.h +++ b/extension/sourcesdk/NextBot/NextBotComponentInterface.h @@ -33,12 +33,20 @@ class INextBotComponent : public INextBotEventResponder INextBotComponent(INextBot *bot); virtual ~INextBotComponent() { }; - virtual void Reset(void) { m_lastUpdateTime = 0; m_curInterval = TICK_INTERVAL; } + virtual void Reset(void) + { + m_lastUpdateTime = 0.0; + m_curInterval = TICK_INTERVAL; + } + virtual void Update(void) = 0; virtual void Upkeep(void) { }; virtual INextBot *GetBot(void) const { return m_bot; } + +#if SOURCE_ENGINE == SE_TF2 class CUnknown; virtual CUnknown *GetScriptDesc(void) const { return nullptr; } +#endif inline bool ComputeUpdateInterval(void); inline float GetUpdateInterval(void); @@ -52,6 +60,10 @@ class INextBotComponent : public INextBotEventResponder INextBot *m_bot; INextBotComponent *m_nextComponent; +#if SOURCE_ENGINE == SE_TF2 + std::int32_t m_scriptInstance; +#endif + public: static VCall vUpdate; }; diff --git a/product.version b/product.version index a8fdfda..53adb84 100644 --- a/product.version +++ b/product.version @@ -1 +1 @@ -1.8.1 +1.8.2