From: fgsfds Date: Sat, 8 Feb 2020 23:29:45 +0000 (+0300) Subject: only save stats when there's multiple players present X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=64579b586c89085de93fe02cb56be9751105b67c;p=d2df-sdl.git only save stats when there's multiple players present --- diff --git a/src/game/g_game.pas b/src/game/g_game.pas index d03d02a..504171d 100644 --- a/src/game/g_game.pas +++ b/src/game/g_game.pas @@ -1064,14 +1064,15 @@ begin SortGameStat(CustomStat.PlayerStat); - if gSaveStats or gScreenshotStats then + if (gSaveStats or gScreenshotStats) and (Length(gPlayers) > 1) then begin t := Now; if g_Game_IsNet then StatFilename := NetServerName else StatFilename := 'local'; StatDate := FormatDateTime('yymmdd_hhnnss', t); StatFilename := StatFilename + '_' + CustomStat.Map + '_' + g_Game_ModeToText(CustomStat.GameMode); StatFilename := sanitizeFilename(StatFilename) + '_' + StatDate; - if gSaveStats then SaveGameStat(CustomStat, FormatDateTime('yyyy"/"mm"/"dd', t)); + if gSaveStats then + SaveGameStat(CustomStat, FormatDateTime('yyyy"/"mm"/"dd', t)); end; StatShotDone := False;