From 80a4ad52934ab68996466fde1de672f5ea2523e8 Mon Sep 17 00:00:00 2001 From: Alexander Akulich Date: Fri, 3 Nov 2023 21:22:24 +0300 Subject: [PATCH 1/4] CMake: Filter out project patch version == '0' --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f28de9571..59ad00543 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,7 +22,11 @@ else() message(FATAL_ERROR "Couldn't parse version from src/game/version.h") endif() -project(DDNet VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}) +if(VERSION_PATCH STREQUAL "0") + project(DDNet VERSION ${VERSION_MAJOR}.${VERSION_MINOR}) +else() + project(DDNet VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}) +endif() set(ORIGINAL_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}) set(ORIGINAL_CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES}) From cf754c4d6083f7a6e41c3dc5f3b50ca82efceee1 Mon Sep 17 00:00:00 2001 From: Alexander Akulich Date: Sun, 8 Oct 2023 04:35:02 +0300 Subject: [PATCH 2/4] CMenuBackground::GetThemes: Drop unused cast --- src/game/client/components/menu_background.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/game/client/components/menu_background.cpp b/src/game/client/components/menu_background.cpp index 4ef6e4063..8f108eadd 100644 --- a/src/game/client/components/menu_background.cpp +++ b/src/game/client/components/menu_background.cpp @@ -412,8 +412,8 @@ std::vector &CMenuBackground::GetThemes() m_vThemes.emplace_back("rand", true, true); // random theme m_ThemeScanStartTime = time_get_nanoseconds(); - Storage()->ListDirectory(IStorage::TYPE_ALL, "themes", ThemeScan, (CMenuBackground *)this); - Storage()->ListDirectory(IStorage::TYPE_ALL, "themes", ThemeIconScan, (CMenuBackground *)this); + Storage()->ListDirectory(IStorage::TYPE_ALL, "themes", ThemeScan, this); + Storage()->ListDirectory(IStorage::TYPE_ALL, "themes", ThemeIconScan, this); std::sort(m_vThemes.begin() + PREDEFINED_THEMES_COUNT, m_vThemes.end()); } From 17c90fc061e8a1bf1d8a7a7c17dd507a6ec64d9e Mon Sep 17 00:00:00 2001 From: Alexander Akulich Date: Thu, 5 Oct 2023 23:37:53 +0300 Subject: [PATCH 3/4] CCharacter::IsSnappingCharacterInView: Add missing const --- src/game/server/entities/character.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/server/entities/character.cpp b/src/game/server/entities/character.cpp index 170ee5af2..fe25504d9 100644 --- a/src/game/server/entities/character.cpp +++ b/src/game/server/entities/character.cpp @@ -1162,7 +1162,7 @@ bool CCharacter::IsSnappingCharacterInView(int SnappingClientID) { for(const auto &AttachedPlayerID : m_Core.m_AttachedPlayers) { - CCharacter *pOtherPlayer = GameServer()->GetPlayerChar(AttachedPlayerID); + const CCharacter *pOtherPlayer = GameServer()->GetPlayerChar(AttachedPlayerID); if(pOtherPlayer && pOtherPlayer->m_Core.HookedPlayer() == ID) { if(!NetworkClippedLine(SnappingClientID, m_Pos, pOtherPlayer->m_Pos)) From b886b93cf2e4b26a32ecfc487ae30d57a300c7d0 Mon Sep 17 00:00:00 2001 From: Alexander Akulich Date: Fri, 8 Sep 2023 02:07:56 +0300 Subject: [PATCH 4/4] CPlayer: Remove unused variable --- src/game/server/player.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/game/server/player.h b/src/game/server/player.h index 2ddbf23ff..742f4e97c 100644 --- a/src/game/server/player.h +++ b/src/game/server/player.h @@ -112,7 +112,6 @@ public: bool m_ForceBalanced; int m_LastActionTick; int m_TeamChangeTick; - bool m_SentSemicolonTip; // network latency calculations struct