mirror of
https://github.com/glest/glest-source.git
synced 2025-09-01 20:12:40 +02:00
Fixed faction back issue
This commit is contained in:
@@ -110,8 +110,11 @@ namespace Game {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (bFound == false) {
|
if (bFound == false) {
|
||||||
--selectedItemIndex %= items.size();
|
if (selectedItemIndex == 0)
|
||||||
|
selectedItemIndex = items.size() - 1;
|
||||||
|
else
|
||||||
|
selectedItemIndex--;
|
||||||
|
|
||||||
int type = 0;
|
int type = 0;
|
||||||
std::string faction = "";
|
std::string faction = "";
|
||||||
if (menu != NULL) {
|
if (menu != NULL) {
|
||||||
@@ -120,11 +123,12 @@ namespace Game {
|
|||||||
}
|
}
|
||||||
if (menu != NULL
|
if (menu != NULL
|
||||||
&& faction == formatString(GameConstants::OBSERVER_SLOTNAME)
|
&& faction == formatString(GameConstants::OBSERVER_SLOTNAME)
|
||||||
&& (type == ctCpuEasy || type == ctCpu || type == ctCpuUltra || type == ctCpuZeta)) {
|
&& (type == ctCpuEasy || type == ctCpu || type == ctCpuUltra || type == ctCpuZeta || type == ctNetwork)) {
|
||||||
--selectedItemIndex %= items.size();
|
if (selectedItemIndex == 0)
|
||||||
|
selectedItemIndex = items.size() - 1;
|
||||||
|
else
|
||||||
|
selectedItemIndex--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -153,7 +157,7 @@ namespace Game {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (bFound == false) {
|
if (bFound == false) {
|
||||||
++selectedItemIndex %= items.size();
|
selectedItemIndex = (selectedItemIndex + 1) % items.size();
|
||||||
|
|
||||||
int type = 0;
|
int type = 0;
|
||||||
std::string faction = "";
|
std::string faction = "";
|
||||||
@@ -164,7 +168,7 @@ namespace Game {
|
|||||||
if (menu != NULL
|
if (menu != NULL
|
||||||
&& faction == formatString(GameConstants::OBSERVER_SLOTNAME)
|
&& faction == formatString(GameConstants::OBSERVER_SLOTNAME)
|
||||||
&& (type == ctCpuEasy || type == ctCpu || type == ctCpuUltra || type == ctCpuZeta)) {
|
&& (type == ctCpuEasy || type == ctCpu || type == ctCpuUltra || type == ctCpuZeta)) {
|
||||||
++selectedItemIndex %= items.size();
|
selectedItemIndex = (selectedItemIndex + 1) % items.size();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -361,8 +361,6 @@ namespace Game {
|
|||||||
void
|
void
|
||||||
PlayNow(bool saveGame);
|
PlayNow(bool saveGame);
|
||||||
|
|
||||||
void
|
|
||||||
SetActivePlayerNameEditor();
|
|
||||||
void
|
void
|
||||||
cleanup();
|
cleanup();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user