cleaning up the code. part 0.1
This commit is contained in:
parent
e8eb775c23
commit
0c8a246c48
7 changed files with 109 additions and 74 deletions
|
|
@ -17,7 +17,6 @@ extern bool g_waypointOn;
|
|||
extern bool g_autoWaypoint;
|
||||
extern bool g_botsCanPause;
|
||||
extern bool g_editNoclip;
|
||||
extern bool g_isCommencing;
|
||||
|
||||
extern float g_autoPathDistance;
|
||||
extern float g_timeBombPlanted;
|
||||
|
|
@ -74,3 +73,35 @@ static inline bool IsNullString (const char *input)
|
|||
|
||||
return *input == '\0';
|
||||
}
|
||||
|
||||
//
|
||||
// simple class to handle welcome messages
|
||||
//
|
||||
class WelcomeMessage : public Singleton <WelcomeMessage>
|
||||
{
|
||||
private:
|
||||
bool m_gameCommenced;
|
||||
bool m_msgReceived;
|
||||
|
||||
float m_receiveTimer;
|
||||
|
||||
public:
|
||||
WelcomeMessage (void) : m_gameCommenced (false), m_msgReceived (false), m_receiveTimer (0.0f) { }
|
||||
|
||||
public:
|
||||
void SetGameCommenceFlag (bool isCommenced);
|
||||
void VerifyMessageSent (void);
|
||||
};
|
||||
]=.
|
||||
|
||||
|
||||
inline void WelcomeMessage::SetGameCommenceFlag (bool isCommenced)
|
||||
{
|
||||
m_gameCommenced = isCommenced;
|
||||
|
||||
if (!isCommenced)
|
||||
{
|
||||
m_receiveTimer = 0.0f;
|
||||
m_msgReceived = false;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue