Permalink
Browse files

Fix score and kills not showing in skirmish.

If in debug mode scores and kills would not be shown. Now
they are without them being saved.

Fixes ticket:3491. Patch by forum member Forgon.
  • Loading branch information...
KJeff01 committed Sep 21, 2017
1 parent 52db941 commit a74041b99442caa1c7e14c0ff409fc120c20e666
Showing with 8 additions and 8 deletions.
  1. +8 −8 src/multistat.cpp
View
@@ -217,6 +217,10 @@ bool loadMultiStats(char *sPlayerName, PLAYERSTATS *st)
// Save Player Stats
bool saveMultiStats(const char *sFileName, const char *sPlayerName, const PLAYERSTATS *st)
{
if (Cheated)
{
return false;
}
char buffer[1000];
char fileName[255] = "";
@@ -236,10 +240,6 @@ bool saveMultiStats(const char *sFileName, const char *sPlayerName, const PLAYER
// update players damage stats.
void updateMultiStatsDamage(UDWORD attacker, UDWORD defender, UDWORD inflicted)
{
if (Cheated)
{
return;
}
// FIXME: Why in the world are we using two different structs for stats when we can use only one?
if (attacker < MAX_PLAYERS)
{
@@ -272,7 +272,7 @@ void updateMultiStatsDamage(UDWORD attacker, UDWORD defender, UDWORD inflicted)
// update games played.
void updateMultiStatsGames()
{
if (Cheated || selectedPlayer >= MAX_PLAYERS)
if (selectedPlayer >= MAX_PLAYERS)
{
return;
}
@@ -282,7 +282,7 @@ void updateMultiStatsGames()
// games won
void updateMultiStatsWins()
{
if (Cheated || selectedPlayer >= MAX_PLAYERS)
if (selectedPlayer >= MAX_PLAYERS)
{
return;
}
@@ -292,7 +292,7 @@ void updateMultiStatsWins()
//games lost.
void updateMultiStatsLoses()
{
if (Cheated || selectedPlayer >= MAX_PLAYERS)
if (selectedPlayer >= MAX_PLAYERS)
{
return;
}
@@ -302,7 +302,7 @@ void updateMultiStatsLoses()
// update kills
void updateMultiStatsKills(BASE_OBJECT *psKilled, UDWORD player)
{
if (Cheated || player >= MAX_PLAYERS)
if (player >= MAX_PLAYERS)
{
return;
}

0 comments on commit a74041b

Please sign in to comment.