- disabled jps for now and fixed ai multiplier for headless mode
This commit is contained in:
parent
d3eda7d0f2
commit
fdd04d10c1
|
@ -965,7 +965,7 @@ TravelState PathFinder::aStar(Unit *unit, const Vec2i &targetPos, bool inBailout
|
||||||
if(nodeLimitReached == false) {
|
if(nodeLimitReached == false) {
|
||||||
//printf("\n\n\n====== START AStar-JPS Pathfinder start [%s] end [%s]\n",unitPos.getString().c_str(),finalPos.getString().c_str());
|
//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) {
|
while(nodeLimitReached == false) {
|
||||||
whileLoopCount++;
|
whileLoopCount++;
|
||||||
|
|
|
@ -938,6 +938,35 @@ void MenuStateConnectedGame::broadCastGameSettingsToMasterserver() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MenuStateConnectedGame::updateResourceMultiplier(const int index) {
|
||||||
|
ControlType ct= static_cast<ControlType>(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) {
|
void MenuStateConnectedGame::mouseClickAdmin(int x, int y, MouseButton mouseButton) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -1209,7 +1238,7 @@ void MenuStateConnectedGame::mouseClickAdmin(int x, int y, MouseButton mouseButt
|
||||||
// needToSetChangedGameSettings = true;
|
// needToSetChangedGameSettings = true;
|
||||||
// lastSetChangedGameSettings = time(NULL);
|
// lastSetChangedGameSettings = time(NULL);
|
||||||
// }
|
// }
|
||||||
// updateResourceMultiplier(i);
|
updateResourceMultiplier(i);
|
||||||
|
|
||||||
broadCastGameSettingsToMasterserver();
|
broadCastGameSettingsToMasterserver();
|
||||||
}
|
}
|
||||||
|
|
|
@ -222,6 +222,7 @@ private:
|
||||||
void PlayNow(bool saveGame);
|
void PlayNow(bool saveGame);
|
||||||
bool isMasterserverAdmin();
|
bool isMasterserverAdmin();
|
||||||
void broadCastGameSettingsToMasterserver();
|
void broadCastGameSettingsToMasterserver();
|
||||||
|
void updateResourceMultiplier(const int index);
|
||||||
};
|
};
|
||||||
|
|
||||||
}}//end namespace
|
}}//end namespace
|
||||||
|
|
Loading…
Reference in New Issue
Block a user