diff --git a/src/engine/shared/netban.h b/src/engine/shared/netban.h index 6194b6ce..1060b4f1 100644 --- a/src/engine/shared/netban.h +++ b/src/engine/shared/netban.h @@ -75,11 +75,8 @@ class CNetBan struct CBanInfo { - enum - { - EXPIRES_NEVER = -1, - REASON_LENGTH = 64, - }; + static constexpr int EXPIRES_NEVER = -1; + static constexpr std::size_t REASON_LENGTH = 64; int m_Expires; char m_aReason[REASON_LENGTH]; }; diff --git a/src/game/server/gamecontext.cpp b/src/game/server/gamecontext.cpp index 98e5360c..5933a34e 100644 --- a/src/game/server/gamecontext.cpp +++ b/src/game/server/gamecontext.cpp @@ -1,7 +1,5 @@ /* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */ /* If you are missing that file, acquire a complete release at teeworlds.com. */ -#include - #include #include #include @@ -16,7 +14,6 @@ #include #include #include -#include #include #include @@ -1792,7 +1789,6 @@ void CGameContext::OnClientEnter(int ClientId) Server()->ExpireServerInfo(); - CPlayer *pNewPlayer = m_apPlayers[ClientId]; mem_zero(&m_aLastPlayerInput[ClientId], sizeof(m_aLastPlayerInput[ClientId])); m_aPlayerHasInput[ClientId] = false; } @@ -3794,7 +3790,6 @@ void CGameContext::PrivateMessage(const char* pStr, int ClientId, bool TeamChat) Msg.m_Team = (TeamChat ? 1 : 0); Msg.m_ClientId = ClientId; - int NumPlayerFound = 0; for(int i=0; iSendPackMsg(&Msg, MSGFLAG_VITAL, i); - - NumPlayerFound++; } } } diff --git a/src/game/server/infclass/entities/infccharacter.cpp b/src/game/server/infclass/entities/infccharacter.cpp index 08ab735d..e0c882b9 100644 --- a/src/game/server/infclass/entities/infccharacter.cpp +++ b/src/game/server/infclass/entities/infccharacter.cpp @@ -213,7 +213,6 @@ void CInfClassCharacter::Tick() return; } - const vec2 PrevPos = m_Core.m_Pos; const int CurrentTick = Server()->Tick(); GameController()->HandleCharacterTiles(this); diff --git a/src/game/server/infclass/events-director.cpp b/src/game/server/infclass/events-director.cpp index 2223cf08..7fa566df 100644 --- a/src/game/server/infclass/events-director.cpp +++ b/src/game/server/infclass/events-director.cpp @@ -9,8 +9,6 @@ #include -static const char WinterSuffix[] = "_winter"; - enum class EventType { None, @@ -19,7 +17,6 @@ enum class EventType }; static EventType PreloadedMapEventType = EventType::None; -static char aEventId[32] = {0}; const char *EventsDirector::GetMapConverterId(const char *pConverterId) {