revert game interface class, i'm just too lazy to do it now...

This commit is contained in:
jeefo 2016-03-05 21:22:29 +03:00
commit 6136bace18
8 changed files with 36 additions and 83 deletions

View file

@ -1503,7 +1503,6 @@ public:
};
#include <engine.h>
#include <gamestate.h>
// expose bot super-globals
extern NetworkMsg netmsg;
@ -1511,7 +1510,6 @@ extern Localizer locale;
extern Waypoint waypoints;
extern BotManager bots;
extern Engine engine;
extern Game game;
// prototypes of bot functions...
extern int GetWeaponReturn (bool isString, const char *weaponAlias, int weaponIndex = -1);

View file

@ -11,7 +11,31 @@
#pragma once
//
// netmessage handler class
class NetworkMsg
{
private:
Bot *m_bot;
int m_state;
int m_message;
int m_registerdMessages[NETMSG_NUM];
public:
NetworkMsg (void);
~NetworkMsg (void) { };
void Execute (void *p);
inline void Reset (void) { m_message = NETMSG_UNDEFINED; m_state = 0; m_bot = NULL; };
void HandleMessageIfRequired (int messageType, int requiredType);
inline void SetMessage (int message) { m_message = message; }
inline void SetBot (Bot *bot) { m_bot = bot; }
inline int GetId (int messageType) { return m_registerdMessages[messageType]; }
inline void SetId (int messageType, int messsageIdentifier) { m_registerdMessages[messageType] = messsageIdentifier; }
};
// game events
class IGameEvents
{
public: