mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-12 03:00:38 +00:00
- fixed level names in statistics printout.
This commit is contained in:
parent
6a40d71e89
commit
020692588c
1 changed files with 11 additions and 10 deletions
|
@ -368,7 +368,10 @@ void STAT_NewLevel(const char* mapname)
|
||||||
{
|
{
|
||||||
STAT_StartNewGame("", 0); // reset and deactivate for user maps
|
STAT_StartNewGame("", 0); // reset and deactivate for user maps
|
||||||
}
|
}
|
||||||
else LevelName = mapname;
|
else
|
||||||
|
{
|
||||||
|
LevelName = mapname[0] == '/' ? mapname + 1 : mapname;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
@ -413,8 +416,6 @@ void STAT_Update(bool endofgame)
|
||||||
StoreLevelStats();
|
StoreLevelStats();
|
||||||
|
|
||||||
if (savestatistics == 1 && endofgame)
|
if (savestatistics == 1 && endofgame)
|
||||||
{
|
|
||||||
if (LevelData.Size() == 0)
|
|
||||||
{
|
{
|
||||||
auto lump = fileSystem.FindFile(LevelName);
|
auto lump = fileSystem.FindFile(LevelName);
|
||||||
if (lump >= 0)
|
if (lump >= 0)
|
||||||
|
@ -422,8 +423,8 @@ void STAT_Update(bool endofgame)
|
||||||
int file = fileSystem.GetFileContainer(lump);
|
int file = fileSystem.GetFileContainer(lump);
|
||||||
fn = fileSystem.GetResourceFileName(file);
|
fn = fileSystem.GetResourceFileName(file);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
FString section = ExtractFileBase(fn) + "." + LevelData[0].Levelname;
|
FString section = ExtractFileBase(fn) + "." + ExtractFileBase(LevelData[0].Levelname);
|
||||||
section.ToUpper();
|
section.ToUpper();
|
||||||
FStatistics* sl = GetStatisticsList(EpisodeStatistics, section, StartEpisode);
|
FStatistics* sl = GetStatisticsList(EpisodeStatistics, section, StartEpisode);
|
||||||
|
|
||||||
|
@ -444,7 +445,7 @@ void STAT_Update(bool endofgame)
|
||||||
|
|
||||||
for (unsigned i = 0; i < LevelData.Size(); i++)
|
for (unsigned i = 0; i < LevelData.Size(); i++)
|
||||||
{
|
{
|
||||||
FString lsection = LevelData[i].Levelname;
|
FString lsection = ExtractFileBase(LevelData[i].Levelname);
|
||||||
lsection.ToUpper();
|
lsection.ToUpper();
|
||||||
infostring.Format("%4d/%4d, %3d/%3d", LevelData[i].killcount, LevelData[i].totalkills, LevelData[i].secretcount, LevelData[i].totalsecrets);
|
infostring.Format("%4d/%4d, %3d/%3d", LevelData[i].killcount, LevelData[i].totalkills, LevelData[i].secretcount, LevelData[i].totalsecrets);
|
||||||
LevelStatEntry(es, lsection, infostring, LevelData[i].leveltime);
|
LevelStatEntry(es, lsection, infostring, LevelData[i].leveltime);
|
||||||
|
|
Loading…
Reference in a new issue