diff --git a/source/glest_game/ai/path_finder.cpp b/source/glest_game/ai/path_finder.cpp index 8c5f0465..570bc3d5 100644 --- a/source/glest_game/ai/path_finder.cpp +++ b/source/glest_game/ai/path_finder.cpp @@ -965,7 +965,7 @@ TravelState PathFinder::aStar(Unit *unit, const Vec2i &targetPos, bool inBailout if(nodeLimitReached == false) { //printf("\n\n\n====== START AStar-JPS Pathfinder start [%s] end [%s]\n",unitPos.getString().c_str(),finalPos.getString().c_str()); - const bool tryJPSPathfinder = true; + const bool tryJPSPathfinder = false; while(nodeLimitReached == false) { whileLoopCount++; diff --git a/source/glest_game/menu/menu_state_connected_game.cpp b/source/glest_game/menu/menu_state_connected_game.cpp index e97a3f10..2126ed80 100644 --- a/source/glest_game/menu/menu_state_connected_game.cpp +++ b/source/glest_game/menu/menu_state_connected_game.cpp @@ -938,6 +938,35 @@ void MenuStateConnectedGame::broadCastGameSettingsToMasterserver() { } +void MenuStateConnectedGame::updateResourceMultiplier(const int index) { + ControlType ct= static_cast(listBoxControls[index].getSelectedItemIndex()); + if(ct == ctHuman || ct == ctNetwork || ct == ctClosed) { + listBoxRMultiplier[index].setSelectedItemIndex((GameConstants::normalMultiplier-0.5f)*10); + listBoxRMultiplier[index].setEnabled(false); + } + else if(ct == ctCpuEasy || ct == ctNetworkCpuEasy) + { + listBoxRMultiplier[index].setSelectedItemIndex((GameConstants::easyMultiplier-0.5f)*10); + listBoxRMultiplier[index].setEnabled(true); + } + else if(ct == ctCpu || ct == ctNetworkCpu) { + listBoxRMultiplier[index].setSelectedItemIndex((GameConstants::normalMultiplier-0.5f)*10); + listBoxRMultiplier[index].setEnabled(true); + } + else if(ct == ctCpuUltra || ct == ctNetworkCpuUltra) + { + listBoxRMultiplier[index].setSelectedItemIndex((GameConstants::ultraMultiplier-0.5f)*10); + listBoxRMultiplier[index].setEnabled(true); + } + else if(ct == ctCpuMega || ct == ctNetworkCpuMega) + { + listBoxRMultiplier[index].setSelectedItemIndex((GameConstants::megaMultiplier-0.5f)*10); + listBoxRMultiplier[index].setEnabled(true); + } + listBoxRMultiplier[index].setEditable(listBoxRMultiplier[index].getEnabled()); + listBoxRMultiplier[index].setVisible(listBoxRMultiplier[index].getEnabled()); +} + void MenuStateConnectedGame::mouseClickAdmin(int x, int y, MouseButton mouseButton) { try { @@ -1209,7 +1238,7 @@ void MenuStateConnectedGame::mouseClickAdmin(int x, int y, MouseButton mouseButt // needToSetChangedGameSettings = true; // lastSetChangedGameSettings = time(NULL); // } -// updateResourceMultiplier(i); + updateResourceMultiplier(i); broadCastGameSettingsToMasterserver(); } diff --git a/source/glest_game/menu/menu_state_connected_game.h b/source/glest_game/menu/menu_state_connected_game.h index e2b5bc58..9d663f3e 100644 --- a/source/glest_game/menu/menu_state_connected_game.h +++ b/source/glest_game/menu/menu_state_connected_game.h @@ -222,6 +222,7 @@ private: void PlayNow(bool saveGame); bool isMasterserverAdmin(); void broadCastGameSettingsToMasterserver(); + void updateResourceMultiplier(const int index); }; }}//end namespace