- bugfix if user clicks around while game loading
- cleanup from last checkin (corrections)
This commit is contained in:
parent
28d65e8d55
commit
81989f5947
|
@ -1265,6 +1265,8 @@ void Game::init(bool initForPreviewOnly) {
|
||||||
logger.add(Lang::getInstance().get("LogScreenGameLoadingLaunchGame","",true));
|
logger.add(Lang::getInstance().get("LogScreenGameLoadingLaunchGame","",true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//throw "test";
|
||||||
|
|
||||||
logger.setCancelLoadingEnabled(false);
|
logger.setCancelLoadingEnabled(false);
|
||||||
|
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"================ STARTING GAME ================\n");
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"================ STARTING GAME ================\n");
|
||||||
|
@ -1775,6 +1777,7 @@ void Game::update() {
|
||||||
}
|
}
|
||||||
catch(const exception &ex) {
|
catch(const exception &ex) {
|
||||||
gameStarted = true;
|
gameStarted = true;
|
||||||
|
totalRenderFps++;
|
||||||
|
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
|
@ -2479,7 +2482,7 @@ void Game::mouseDownLeft(int x, int y) {
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if(gameStarted == false) {
|
if(gameStarted == false || totalRenderFps <= 0) {
|
||||||
Logger::getInstance().handleMouseClick(x, y);
|
Logger::getInstance().handleMouseClick(x, y);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2990,7 +2993,7 @@ void Game::mouseDownRight(int x, int y) {
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if(gameStarted == false) {
|
if(gameStarted == false || totalRenderFps <= 0) {
|
||||||
Logger::getInstance().handleMouseClick(x, y);
|
Logger::getInstance().handleMouseClick(x, y);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -3042,7 +3045,7 @@ void Game::mouseDownRight(int x, int y) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(gameStarted == false) {
|
if(gameStarted == false || totalRenderFps <= 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3065,7 +3068,7 @@ void Game::mouseUpLeft(int x, int y) {
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if(gameStarted == false) {
|
if(gameStarted == false || totalRenderFps <= 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3100,7 +3103,7 @@ void Game::mouseDoubleClickLeft(int x, int y) {
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if(gameStarted == false) {
|
if(gameStarted == false || totalRenderFps <= 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(currentUIState != NULL) {
|
if(currentUIState != NULL) {
|
||||||
|
@ -3146,7 +3149,7 @@ void Game::mouseMove(int x, int y, const MouseState *ms) {
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if(gameStarted == false) {
|
if(gameStarted == false || totalRenderFps <= 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(currentUIState != NULL) {
|
if(currentUIState != NULL) {
|
||||||
|
@ -3365,7 +3368,7 @@ void Game::keyDown(SDL_KeyboardEvent key) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] key = [%c] [%d] gameStarted [%d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,key.keysym.sym,key.keysym.sym, gameStarted);
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] key = [%c] [%d] gameStarted [%d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,key.keysym.sym,key.keysym.sym, gameStarted);
|
||||||
if(gameStarted == false) {
|
if(gameStarted == false || totalRenderFps <= 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(currentUIState != NULL) {
|
if(currentUIState != NULL) {
|
||||||
|
@ -3661,7 +3664,7 @@ void Game::keyUp(SDL_KeyboardEvent key) {
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if(gameStarted == false) {
|
if(gameStarted == false || totalRenderFps <= 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(currentUIState != NULL) {
|
if(currentUIState != NULL) {
|
||||||
|
@ -3767,7 +3770,7 @@ void Game::keyPress(SDL_KeyboardEvent c) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(gameStarted == false) {
|
if(gameStarted == false || totalRenderFps <= 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(currentUIState != NULL) {
|
if(currentUIState != NULL) {
|
||||||
|
|
|
@ -2313,7 +2313,7 @@ string World::getAllFactionsCacheStats() {
|
||||||
}
|
}
|
||||||
|
|
||||||
char szBuf[8096]="";
|
char szBuf[8096]="";
|
||||||
snprintf(szBuf,8096,"totalCache1Size [%lu] totalCache1Size [%lu] total KB: %s",totalCache1Size,totalCache2Size,formatNumber(totalBytes).c_str());
|
snprintf(szBuf,8096,"totalCache1Size [%llu] totalCache1Size [%llu] total KB: %s",(long long unsigned)totalCache1Size,(long long unsigned)totalCache2Size,formatNumber(totalBytes).c_str());
|
||||||
result = szBuf;
|
result = szBuf;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user