code cleanup

This commit is contained in:
Mark Vejvoda 2013-06-04 04:36:00 +00:00
parent aab72b863c
commit b6780d2af7
3 changed files with 3 additions and 4 deletions

View File

@ -787,8 +787,8 @@ void Commander::giveNetworkCommand(NetworkCommand* networkCommand) const {
commandWasHandled = true; commandWasHandled = true;
bool pauseGame = networkCommand->getUnitId() != 0; bool pauseGame = networkCommand->getUnitId() != 0;
bool clearCaches = networkCommand->getCommandTypeId(); bool clearCaches = (networkCommand->getCommandTypeId() == 1);
bool joinNetworkGame = networkCommand->getUnitTypeId(); bool joinNetworkGame = (networkCommand->getUnitTypeId() == 1);
Game *game = this->world->getGame(); Game *game = this->world->getGame();
//printf("nctPauseResume pauseGame = %d\n",pauseGame); //printf("nctPauseResume pauseGame = %d\n",pauseGame);

View File

@ -1933,7 +1933,7 @@ void ScriptManager::unregisterDayNightEvent() {
void ScriptManager::onDayNightTriggerEvent() { void ScriptManager::onDayNightTriggerEvent() {
if(registeredDayNightEvent == true) { if(registeredDayNightEvent == true) {
bool isDay = this->getIsDayTime(); bool isDay = (this->getIsDayTime() == 1);
if((lastDayNightTriggerStatus != 1 && isDay == true) || if((lastDayNightTriggerStatus != 1 && isDay == true) ||
(lastDayNightTriggerStatus != 2 && isDay == false)) { (lastDayNightTriggerStatus != 2 && isDay == false)) {
if(isDay == true) { if(isDay == true) {

View File

@ -3531,7 +3531,6 @@ int glestMain(int argc, char** argv) {
setupGameItemPaths(argc, argv, &config); setupGameItemPaths(argc, argv, &config);
if(config.getString("PlayerId","") == "") { if(config.getString("PlayerId","") == "") {
Shared::Util::uuid_t u;
char uuid_str[38]; char uuid_str[38];
get_uuid_string(uuid_str,sizeof(uuid_str)); get_uuid_string(uuid_str,sizeof(uuid_str));