Skip to content

Commit

Permalink
Merge pull request ddnet#7411 from infclass/for-ddnet
Browse files Browse the repository at this point in the history
Fix displayed version (drop patch version if == 0), do some random little cleanup
  • Loading branch information
def- authored Nov 3, 2023
2 parents dbfe888 + b886b93 commit 1d93695
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down
4 changes: 2 additions & 2 deletions src/game/client/components/menu_background.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -412,8 +412,8 @@ std::vector<CTheme> &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());
}
Expand Down
2 changes: 1 addition & 1 deletion src/game/server/entities/character.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
1 change: 0 additions & 1 deletion src/game/server/player.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ class CPlayer
bool m_ForceBalanced;
int m_LastActionTick;
int m_TeamChangeTick;
bool m_SentSemicolonTip;

// network latency calculations
struct
Expand Down

0 comments on commit 1d93695

Please sign in to comment.