From 58927375fcf01e9dd2a5c09f69b63d3ea6107349 Mon Sep 17 00:00:00 2001 From: def Date: Wed, 22 Aug 2018 22:27:01 +0200 Subject: [PATCH] Add message for failed database connection --- src/game/server/gamecontext.cpp | 2 +- src/game/server/score/sql_score.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/game/server/gamecontext.cpp b/src/game/server/gamecontext.cpp index cafdcf23b..82a6ccdd1 100644 --- a/src/game/server/gamecontext.cpp +++ b/src/game/server/gamecontext.cpp @@ -422,7 +422,7 @@ void CGameContext::SendBroadcast(const char *pText, int ClientID, bool IsImporta if(ClientID == -1) { - dbg_assert(IsImportant, "broadcast messages to all players must be important"); + dbg_assert(IsImportant, "broadcast messages to all players must be important"); Server()->SendPackMsg(&Msg, MSGFLAG_VITAL, ClientID); for(int i = 0; i < MAX_CLIENTS; i++) diff --git a/src/game/server/score/sql_score.cpp b/src/game/server/score/sql_score.cpp index ef930e194..81574bc90 100644 --- a/src/game/server/score/sql_score.cpp +++ b/src/game/server/score/sql_score.cpp @@ -512,6 +512,8 @@ bool CSqlScore::SaveScoreThread(CSqlServer* pSqlServer, const CSqlData *pGameDat io_close(File); lock_unlock(ms_FailureFileLock); + pData->GameServer()->SendBroadcast("Database connection failed, score written to a file instead. Admins will add it manually in a few days.", -1); + return true; } lock_unlock(ms_FailureFileLock);