Merge pull request #7411 from infclass/for-ddnet

Fix displayed version (drop patch version if == 0), do some random little cleanup
This commit is contained in:
Dennis Felsing 2023-11-03 21:46:32 +00:00 committed by GitHub
commit 1d9369593e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 5 deletions

View file

@ -22,7 +22,11 @@ else()
message(FATAL_ERROR "Couldn't parse version from src/game/version.h") message(FATAL_ERROR "Couldn't parse version from src/game/version.h")
endif() endif()
if(VERSION_PATCH STREQUAL "0")
project(DDNet VERSION ${VERSION_MAJOR}.${VERSION_MINOR})
else()
project(DDNet VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}) project(DDNet VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})
endif()
set(ORIGINAL_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}) set(ORIGINAL_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH})
set(ORIGINAL_CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES}) set(ORIGINAL_CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES})

View file

@ -412,8 +412,8 @@ std::vector<CTheme> &CMenuBackground::GetThemes()
m_vThemes.emplace_back("rand", true, true); // random theme m_vThemes.emplace_back("rand", true, true); // random theme
m_ThemeScanStartTime = time_get_nanoseconds(); m_ThemeScanStartTime = time_get_nanoseconds();
Storage()->ListDirectory(IStorage::TYPE_ALL, "themes", ThemeScan, (CMenuBackground *)this); Storage()->ListDirectory(IStorage::TYPE_ALL, "themes", ThemeScan, this);
Storage()->ListDirectory(IStorage::TYPE_ALL, "themes", ThemeIconScan, (CMenuBackground *)this); Storage()->ListDirectory(IStorage::TYPE_ALL, "themes", ThemeIconScan, this);
std::sort(m_vThemes.begin() + PREDEFINED_THEMES_COUNT, m_vThemes.end()); std::sort(m_vThemes.begin() + PREDEFINED_THEMES_COUNT, m_vThemes.end());
} }

View file

@ -1162,7 +1162,7 @@ bool CCharacter::IsSnappingCharacterInView(int SnappingClientID)
{ {
for(const auto &AttachedPlayerID : m_Core.m_AttachedPlayers) 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(pOtherPlayer && pOtherPlayer->m_Core.HookedPlayer() == ID)
{ {
if(!NetworkClippedLine(SnappingClientID, m_Pos, pOtherPlayer->m_Pos)) if(!NetworkClippedLine(SnappingClientID, m_Pos, pOtherPlayer->m_Pos))

View file

@ -112,7 +112,6 @@ public:
bool m_ForceBalanced; bool m_ForceBalanced;
int m_LastActionTick; int m_LastActionTick;
int m_TeamChangeTick; int m_TeamChangeTick;
bool m_SentSemicolonTip;
// network latency calculations // network latency calculations
struct struct