From 6921474f0c2a94aea6c3425e55dec468164e3ae4 Mon Sep 17 00:00:00 2001 From: ds Date: Thu, 5 Nov 2020 16:43:30 +0300 Subject: [PATCH] fix build --- src/module.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/module.cpp b/src/module.cpp index 213358d..0f89386 100644 --- a/src/module.cpp +++ b/src/module.cpp @@ -8,7 +8,7 @@ #include // module interface implementation -class YaPBModule : public IYaPBModule, public Singleton { +class YaPBModule : public IYaPBModule { private: Bot *getBot (int index) { if (index < 1) { @@ -25,7 +25,7 @@ public: // checks if bots are currently in game virtual bool isBotsInGame () override { - return bots.getBotCount () > 0 ; + return bots.getBotCount () > 0; } // checks whether specified players is a yapb bot @@ -65,7 +65,7 @@ public: } // force bot to go to the selected node - virtual void setBotGoal (int entity, int node) { + virtual void setBotGoal (int entity, int node) override { if (!graph.exists (node)) { return; } @@ -77,7 +77,7 @@ public: } // force bot to go to selected origin - virtual void setBotGoalOrigin (int entity, float *origin) { + virtual void setBotGoalOrigin (int entity, float *origin) override { auto bot = getBot (entity); if (bot) { @@ -86,12 +86,12 @@ public: } }; -CR_EXPOSE_GLOBAL_SINGLETON (YaPBModule, botModule); - // export all the stuff, maybe add versioned interface ? CR_EXPORT IYaPBModule *GetBotAPI (int version) { if (version != kYaPBModuleVersion) { return nullptr; } + static YaPBModule botModule; + return &botModule; }