Code cleanup

This commit is contained in:
mathusummut
2018-12-16 23:36:51 +01:00
parent 9b2fd99049
commit b73f67bf2a
6 changed files with 10 additions and 9 deletions

View File

@@ -472,6 +472,9 @@ namespace Game {
return renderInGamePerformance;
}
void
ReplaceDisconnectedNetworkPlayersWithAI(bool isNetworkGame, NetworkRole role, bool showMessage);
private:
//render
void render3d();
@@ -501,8 +504,6 @@ namespace Game {
void renderWorker();
static int ErrorDisplayMessage(const char *msg, bool exitApp);
void
ReplaceDisconnectedNetworkPlayersWithAI(bool isNetworkGame, NetworkRole role, bool showMessage);
void calcCameraMoveX();
void calcCameraMoveZ();

View File

@@ -1533,7 +1533,7 @@ namespace Game {
visibleQuad.p[3].x, visibleQuad.p[3].y);
}
} catch (PROJECTION_TO_INFINITY &e) {
if (debug) printf("hmm staring at the horizon %d\n", (int) e);
if (debug) printf("staring at the horizon %d\n", (int) e);
// use historic code solution
visibleQuad = this->gameCamera->computeVisibleQuad();
}

View File

@@ -33,6 +33,7 @@
#include <cassert>
#include "shared_const.h"
#include "leak_dumper.h"
#include "game.h"
using namespace std;
using namespace Shared;
@@ -1740,7 +1741,7 @@ namespace Game {
return;
}
Shared::Platform::Window::handleEvent();
::Shared::Platform::Window::handleEvent();
// sleep a bit
sleep(waitSleepTime);
}

View File

@@ -410,7 +410,6 @@ namespace Game {
void GameNetworkInterface::requestCommand(const NetworkCommand *networkCommand, bool insertAtStart) {
assert(networkCommand != NULL);
Mutex *mutex = getServerSynchAccessor();
if (insertAtStart == false) {
MutexSafeWrapper safeMutex(mutex, string(__FILE__) + "_" + intToStr(__LINE__));
requestedCommands.push_back(*networkCommand);

View File

@@ -264,11 +264,11 @@ namespace Shared {
float TextFTGL::Advance(const char* str, const int len) {
float result = ftFont->Advance(str, len);
GLenum error = glGetError();
/*GLenum error = glGetError();
if (error != GL_NO_ERROR) {
printf("\n[%s::%s] Line %d Error = %d [%s] for text [%s]\n", __FILE__, __FUNCTION__, __LINE__, error, gluErrorString(error), str);
fflush(stdout);
}
}*/
if (ftFont->Error()) {
char szBuf[8096] = "";

View File

@@ -421,7 +421,7 @@ namespace Shared {
void TextRenderer3DGl::specialFTGLErrorCheckWorkaround(string text) {
for (GLenum error = glGetError(); error != GL_NO_ERROR; error = glGetError()) {
/*for (GLenum error = glGetError(); error != GL_NO_ERROR; error = glGetError()) {
//error = glGetError();
//if(error) {
if (SystemFlags::VERBOSE_MODE_ENABLED) printf("\n\nIn [%s::%s Line: %d] error = %d for text [%s]\n\n", __FILE__, __FUNCTION__, __LINE__, error, text.c_str());
@@ -437,7 +437,7 @@ namespace Shared {
}
currentFTGLErrorCount++;
}
}*/
//}
}