endgame stats screen shows multiplier now for CPU players
you cannot switch unvisible resource multiplier any more
This commit is contained in:
parent
cc4f268988
commit
c2c9cc0044
|
@ -29,6 +29,7 @@ class PlayerStats {
|
||||||
public:
|
public:
|
||||||
PlayerStats() {
|
PlayerStats() {
|
||||||
control = ctClosed;
|
control = ctClosed;
|
||||||
|
resourceMultiplier=1.0f;
|
||||||
factionTypeName = "";
|
factionTypeName = "";
|
||||||
personalityType = fpt_Normal;
|
personalityType = fpt_Normal;
|
||||||
teamIndex = 0;
|
teamIndex = 0;
|
||||||
|
@ -42,6 +43,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
ControlType control;
|
ControlType control;
|
||||||
|
float resourceMultiplier;
|
||||||
string factionTypeName;
|
string factionTypeName;
|
||||||
FactionPersonalityType personalityType;
|
FactionPersonalityType personalityType;
|
||||||
int teamIndex;
|
int teamIndex;
|
||||||
|
@ -83,6 +85,7 @@ public:
|
||||||
const string &getFactionTypeName(int factionIndex) const {return playerStats[factionIndex].factionTypeName;}
|
const string &getFactionTypeName(int factionIndex) const {return playerStats[factionIndex].factionTypeName;}
|
||||||
FactionPersonalityType getPersonalityType(int factionIndex) const { return playerStats[factionIndex].personalityType;}
|
FactionPersonalityType getPersonalityType(int factionIndex) const { return playerStats[factionIndex].personalityType;}
|
||||||
ControlType getControl(int factionIndex) const {return playerStats[factionIndex].control;}
|
ControlType getControl(int factionIndex) const {return playerStats[factionIndex].control;}
|
||||||
|
float getResourceMultiplier(int factionIndex) const {return playerStats[factionIndex].resourceMultiplier;}
|
||||||
bool getVictory(int factionIndex) const {return playerStats[factionIndex].victory;}
|
bool getVictory(int factionIndex) const {return playerStats[factionIndex].victory;}
|
||||||
int getTeam(int factionIndex) const {return playerStats[factionIndex].teamIndex;}
|
int getTeam(int factionIndex) const {return playerStats[factionIndex].teamIndex;}
|
||||||
int getKills(int factionIndex) const {return playerStats[factionIndex].kills;}
|
int getKills(int factionIndex) const {return playerStats[factionIndex].kills;}
|
||||||
|
@ -96,6 +99,7 @@ public:
|
||||||
void setFactionTypeName(int playerIndex, const string& factionTypeName) {playerStats[playerIndex].factionTypeName= factionTypeName;}
|
void setFactionTypeName(int playerIndex, const string& factionTypeName) {playerStats[playerIndex].factionTypeName= factionTypeName;}
|
||||||
void setPersonalityType(int playerIndex, FactionPersonalityType value) { playerStats[playerIndex].personalityType = value;}
|
void setPersonalityType(int playerIndex, FactionPersonalityType value) { playerStats[playerIndex].personalityType = value;}
|
||||||
void setControl(int playerIndex, ControlType control) {playerStats[playerIndex].control= control;}
|
void setControl(int playerIndex, ControlType control) {playerStats[playerIndex].control= control;}
|
||||||
|
void setResourceMultiplier(int playerIndex, float resourceMultiplier) {playerStats[playerIndex].resourceMultiplier= resourceMultiplier;}
|
||||||
void setTeam(int playerIndex, int teamIndex) {playerStats[playerIndex].teamIndex= teamIndex;}
|
void setTeam(int playerIndex, int teamIndex) {playerStats[playerIndex].teamIndex= teamIndex;}
|
||||||
void setVictorious(int playerIndex);
|
void setVictorious(int playerIndex);
|
||||||
void kill(int killerFactionIndex, int killedFactionIndex);
|
void kill(int killerFactionIndex, int killedFactionIndex);
|
||||||
|
|
|
@ -138,6 +138,10 @@ void BattleEnd::render(){
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(stats.getControl(i)!=ctHuman && stats.getControl(i)!=ctNetwork ){
|
||||||
|
controlString+=" x "+floatToStr(stats.getResourceMultiplier(i),1);
|
||||||
|
}
|
||||||
|
|
||||||
Vec3f color = stats.getPlayerColor(i);
|
Vec3f color = stats.getPlayerColor(i);
|
||||||
|
|
||||||
if(stats.getPlayerName(i) != "") {
|
if(stats.getPlayerName(i) != "") {
|
||||||
|
|
|
@ -411,7 +411,7 @@ MenuStateCustomGame::MenuStateCustomGame(Program *program, MainMenu *mainMenu, b
|
||||||
controlItems.push_back(lang.get("Human"));
|
controlItems.push_back(lang.get("Human"));
|
||||||
|
|
||||||
for(int i=0; i<45; ++i){
|
for(int i=0; i<45; ++i){
|
||||||
rMultiplier.push_back(floatToStr(rMultiplierOffset+0.1f*i));
|
rMultiplier.push_back(floatToStr(rMultiplierOffset+0.1f*i,1));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(config.getBool("EnableNetworkCpu","false") == true) {
|
if(config.getBool("EnableNetworkCpu","false") == true) {
|
||||||
|
@ -797,9 +797,11 @@ void MenuStateCustomGame::mouseClick(int x, int y, MouseButton mouseButton){
|
||||||
for(int i=0; i<mapInfo.players; ++i) {
|
for(int i=0; i<mapInfo.players; ++i) {
|
||||||
MutexSafeWrapper safeMutex(&masterServerThreadAccessor);
|
MutexSafeWrapper safeMutex(&masterServerThreadAccessor);
|
||||||
|
|
||||||
|
if (listBoxAdvanced.getSelectedItemIndex() == 1) {
|
||||||
// set multiplier
|
// set multiplier
|
||||||
if(listBoxRMultiplier[i].mouseClick(x, y)) {
|
if(listBoxRMultiplier[i].mouseClick(x, y)) {
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//ensure thet only 1 human player is present
|
//ensure thet only 1 human player is present
|
||||||
if(listBoxControls[i].mouseClick(x, y)) {
|
if(listBoxControls[i].mouseClick(x, y)) {
|
||||||
|
|
|
@ -961,6 +961,7 @@ void World::initFactionTypes(GameSettings *gs) {
|
||||||
stats.setFactionTypeName(i, formatString(gs->getFactionTypeName(i)));
|
stats.setFactionTypeName(i, formatString(gs->getFactionTypeName(i)));
|
||||||
stats.setPersonalityType(i, getFaction(i)->getType()->getPersonalityType());
|
stats.setPersonalityType(i, getFaction(i)->getType()->getPersonalityType());
|
||||||
stats.setControl(i, gs->getFactionControl(i));
|
stats.setControl(i, gs->getFactionControl(i));
|
||||||
|
stats.setResourceMultiplier(i,gs->getResourceMultiplier(i));
|
||||||
stats.setPlayerName(i,gs->getNetworkPlayerName(i));
|
stats.setPlayerName(i,gs->getNetworkPlayerName(i));
|
||||||
stats.setPlayerColor(i,getFaction(i)->getTexture()->getPixmapConst()->getPixel3f(0, 0));
|
stats.setPlayerColor(i,getFaction(i)->getTexture()->getPixmapConst()->getPixel3f(0, 0));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user