Fixed another dumb warning reported in the forum and added a nice assert for synchronization issues during network game. So, don't try it if you're not ready to get crashes in the face.

This commit is contained in:
Xawotihs@gmail.com
2013-01-26 08:07:31 +00:00
parent da2098368b
commit 365fe10765
2 changed files with 23 additions and 9 deletions

View File

@@ -30,7 +30,7 @@ using namespace std;
class GameObserver{
protected:
unsigned int mSeed;
GameType mGameType;
MTGCardInstance * cardWaitingForTargets;
queue<WEvent *> eventsQueue;
@@ -40,7 +40,6 @@ class GameObserver{
list<string> loadingList;
list<string>::iterator loadingite;
RandomGenerator randomGenerator;
unsigned int mSeed;
WResourceManager* mResourceManager;
JGE* mJGE;
DeckManager* mDeckManager;
@@ -54,7 +53,7 @@ class GameObserver{
bool parseLine(const string& s);
virtual void logAction(const string& s);
bool processAction(const string& s, bool swapPlayer = false);
bool processActions(bool undo
bool processActions(bool undo, bool swapPlayer
#ifdef TESTSUITE
, TestSuiteGame* testgame
#endif
@@ -201,6 +200,7 @@ public:
static void loadPlayer(void*pThis, stringstream& in, stringstream& out);
static void sendAction(void*pThis, stringstream& in, stringstream& out);
static void synchronize(void*pThis, stringstream& in, stringstream& out);
static void checkSynchro(void*pxThis, stringstream& in, stringstream& out);
static void ignoreResponse(void*pThis, stringstream& in, stringstream& out){};
};
#endif