Enable readability-inconsistent-declaration-parameter-name

This commit is contained in:
def 2022-01-22 14:12:59 +01:00
parent 7aac8b5386
commit bc78ba57b9
31 changed files with 86 additions and 85 deletions

View file

@ -42,6 +42,7 @@ Checks: >
readability-qualified-auto,
readability-container-size-empty,
readability-delete-null-pointer,
readability-inconsistent-declaration-parameter-name,
performance-*,
-performance-no-int-to-ptr,
HeaderFilterRegex: 'src/.*'

View file

@ -155,7 +155,7 @@ public:
};
template<typename T, typename F>
T color_cast(const F &f) = delete;
T color_cast(const F&) = delete;
template<>
inline ColorHSLA color_cast(const ColorRGBA &rgb)

View file

@ -1873,14 +1873,14 @@ int str_utf8_to_skeleton(const char *str, int *buf, int buf_len);
Compares two strings for visual appearance.
Parameters:
a - String to compare.
b - String to compare.
str1 - String to compare.
str2 - String to compare.
Returns:
0 if the strings are confusable.
!=0 otherwise.
*/
int str_utf8_comp_confusable(const char *a, const char *b);
int str_utf8_comp_confusable(const char *str1, const char *str2);
/*
Function: str_utf8_tolower
@ -1978,13 +1978,13 @@ const char *str_utf8_skip_whitespaces(const char *str);
the string in-place.
Parameters:
str - Pointer to the string.
param - Pointer to the string.
Remarks:
- The strings are treated as zero-terminated strings.
- The string is modified in-place.
*/
void str_utf8_trim_right(char *str);
void str_utf8_trim_right(char *param);
/*
Function: str_utf8_rewind

View file

@ -361,7 +361,7 @@ void CGhostLoader::Close()
m_File = 0;
}
bool CGhostLoader::GetGhostInfo(const char *pFilename, CGhostInfo *pInfo, const char *pMap, SHA256_DIGEST MapSha256, unsigned MapCrc)
bool CGhostLoader::GetGhostInfo(const char *pFilename, CGhostInfo *pGhostInfo, const char *pMap, SHA256_DIGEST MapSha256, unsigned MapCrc)
{
CGhostHeader Header;
mem_zero(&Header, sizeof(Header));
@ -395,7 +395,7 @@ bool CGhostLoader::GetGhostInfo(const char *pFilename, CGhostInfo *pInfo, const
return false;
}
}
*pInfo = Header.ToGhostInfo();
*pGhostInfo = Header.ToGhostInfo();
return true;
}

View file

@ -83,20 +83,20 @@ void CDbConnectionPool::RegisterDatabase(std::unique_ptr<IDbConnection> pDatabas
void CDbConnectionPool::Execute(
FRead pFunc,
std::unique_ptr<const ISqlData> pThreadData,
std::unique_ptr<const ISqlData> pSqlRequestData,
const char *pName)
{
m_aTasks[FirstElem++].reset(new CSqlExecData(pFunc, std::move(pThreadData), pName));
m_aTasks[FirstElem++].reset(new CSqlExecData(pFunc, std::move(pSqlRequestData), pName));
FirstElem %= sizeof(m_aTasks) / sizeof(m_aTasks[0]);
m_NumElem.Signal();
}
void CDbConnectionPool::ExecuteWrite(
FWrite pFunc,
std::unique_ptr<const ISqlData> pThreadData,
std::unique_ptr<const ISqlData> pSqlRequestData,
const char *pName)
{
m_aTasks[FirstElem++].reset(new CSqlExecData(pFunc, std::move(pThreadData), pName));
m_aTasks[FirstElem++].reset(new CSqlExecData(pFunc, std::move(pSqlRequestData), pName));
FirstElem %= sizeof(m_aTasks) / sizeof(m_aTasks[0]);
m_NumElem.Signal();
}

View file

@ -10,7 +10,7 @@ void DilateImage(unsigned char *pImageBuff, int w, int h, int BPP);
void DilateImageSub(unsigned char *pImageBuff, int w, int h, int BPP, int x, int y, int sw, int sh);
// returned pointer is allocated with malloc
uint8_t *ResizeImage(const uint8_t *pImgData, int Width, int Height, int NewWidth, int NewHeight, int BPP);
uint8_t *ResizeImage(const uint8_t *pImageData, int Width, int Height, int NewWidth, int NewHeight, int BPP);
int HighestBit(int OfVar);

View file

@ -181,7 +181,7 @@ public:
int UnbanByRange(const CNetRange *pRange);
int UnbanByIndex(int Index);
void UnbanAll();
bool IsBanned(const NETADDR *pAddr, char *pBuf, unsigned BufferSize) const;
bool IsBanned(const NETADDR *pOrigAddr, char *pBuf, unsigned BufferSize) const;
static void ConBan(class IConsole::IResult *pResult, void *pUser);
static void ConBanRange(class IConsole::IResult *pResult, void *pUser);

View file

@ -88,8 +88,8 @@ public:
int GetDataUpdates(int Index) const { return m_aSnapshotDataUpdates[Index]; }
void SetStaticsize(int ItemType, int Size);
const CData *EmptyDelta() const;
int CreateDelta(class CSnapshot *pFrom, class CSnapshot *pTo, void *pData);
int UnpackDelta(class CSnapshot *pFrom, class CSnapshot *pTo, const void *pData, int DataSize);
int CreateDelta(class CSnapshot *pFrom, class CSnapshot *pTo, void *pDstData);
int UnpackDelta(class CSnapshot *pFrom, class CSnapshot *pTo, const void *pSrcData, int DataSize);
};
// CSnapshotStorage

View file

@ -18,7 +18,7 @@ public:
CAnimKeyframe *GetFrontFoot() { return &m_FrontFoot; };
CAnimKeyframe *GetAttach() { return &m_Attach; };
void Set(CAnimation *pAnim, float Time);
void Add(CAnimation *pAdded, float Time, float Amount);
void Add(CAnimation *pAnim, float Time, float Amount);
static CAnimState *GetIdle();
};

View file

@ -181,16 +181,16 @@ void CEmoticon::OnRender()
Graphics()->WrapNormal();
}
void CEmoticon::Emote(int Emoticon)
void CEmoticon::Emote(int Emote)
{
CNetMsg_Cl_Emoticon Msg;
Msg.m_Emoticon = Emoticon;
Msg.m_Emoticon = Emote;
Client()->SendPackMsgActive(&Msg, MSGFLAG_VITAL);
if(g_Config.m_ClDummyCopyMoves)
{
CMsgPacker Msg(NETMSGTYPE_CL_EMOTICON, false);
Msg.AddInt(Emoticon);
Msg.AddInt(Emote);
Client()->SendMsg(!g_Config.m_ClDummy, &Msg, MSGFLAG_VITAL);
}
}

View file

@ -57,7 +57,7 @@ class CMapImages : public CComponent
public:
CMapImages();
CMapImages(int ImageSize);
CMapImages(int TextureSize);
IGraphics::CTextureHandle Get(int Index) const { return m_aTextures[Index]; }
int Num() const { return m_Count; }
@ -75,7 +75,7 @@ public:
IGraphics::CTextureHandle GetOverlayTop();
IGraphics::CTextureHandle GetOverlayCenter();
void SetTextureScale(int Size);
void SetTextureScale(int Scale);
int GetTextureScale();
void ChangeEntitiesPath(const char *pPath);

View file

@ -180,18 +180,18 @@ void CSounds::Enqueue(int Channel, int SetId)
}
}
void CSounds::PlayAndRecord(int Chn, int SetId, float Vol, vec2 Pos)
void CSounds::PlayAndRecord(int Channel, int SetId, float Vol, vec2 Pos)
{
CNetMsg_Sv_SoundGlobal Msg;
Msg.m_SoundID = SetId;
Client()->SendPackMsgActive(&Msg, MSGFLAG_NOSEND | MSGFLAG_RECORD);
Play(Chn, SetId, Vol);
Play(Channel, SetId, Vol);
}
void CSounds::Play(int Chn, int SetId, float Vol)
void CSounds::Play(int Channel, int SetId, float Vol)
{
if(Chn == CHN_MUSIC && !g_Config.m_SndMusic)
if(Channel == CHN_MUSIC && !g_Config.m_SndMusic)
return;
int SampleId = GetSampleId(SetId);
@ -199,15 +199,15 @@ void CSounds::Play(int Chn, int SetId, float Vol)
return;
int Flags = 0;
if(Chn == CHN_MUSIC)
if(Channel == CHN_MUSIC)
Flags = ISound::FLAG_LOOP;
Sound()->Play(Chn, SampleId, Flags);
Sound()->Play(Channel, SampleId, Flags);
}
void CSounds::PlayAt(int Chn, int SetId, float Vol, vec2 Pos)
void CSounds::PlayAt(int Channel, int SetId, float Vol, vec2 Pos)
{
if(Chn == CHN_MUSIC && !g_Config.m_SndMusic)
if(Channel == CHN_MUSIC && !g_Config.m_SndMusic)
return;
int SampleId = GetSampleId(SetId);
@ -215,10 +215,10 @@ void CSounds::PlayAt(int Chn, int SetId, float Vol, vec2 Pos)
return;
int Flags = 0;
if(Chn == CHN_MUSIC)
if(Channel == CHN_MUSIC)
Flags = ISound::FLAG_LOOP;
Sound()->PlayAt(Chn, SampleId, Flags, Pos.x, Pos.y);
Sound()->PlayAt(Channel, SampleId, Flags, Pos.x, Pos.y);
}
void CSounds::Stop(int SetId)
@ -232,24 +232,24 @@ void CSounds::Stop(int SetId)
Sound()->Stop(pSet->m_aSounds[i].m_Id);
}
ISound::CVoiceHandle CSounds::PlaySample(int Chn, int SampleId, float Vol, int Flags)
ISound::CVoiceHandle CSounds::PlaySample(int Channel, int SampleId, float Vol, int Flags)
{
if((Chn == CHN_MUSIC && !g_Config.m_SndMusic) || SampleId == -1)
if((Channel == CHN_MUSIC && !g_Config.m_SndMusic) || SampleId == -1)
return ISound::CVoiceHandle();
if(Chn == CHN_MUSIC)
if(Channel == CHN_MUSIC)
Flags |= ISound::FLAG_LOOP;
return Sound()->Play(Chn, SampleId, Flags);
return Sound()->Play(Channel, SampleId, Flags);
}
ISound::CVoiceHandle CSounds::PlaySampleAt(int Chn, int SampleId, float Vol, vec2 Pos, int Flags)
ISound::CVoiceHandle CSounds::PlaySampleAt(int Channel, int SampleId, float Vol, vec2 Pos, int Flags)
{
if((Chn == CHN_MUSIC && !g_Config.m_SndMusic) || SampleId == -1)
if((Channel == CHN_MUSIC && !g_Config.m_SndMusic) || SampleId == -1)
return ISound::CVoiceHandle();
if(Chn == CHN_MUSIC)
if(Channel == CHN_MUSIC)
Flags |= ISound::FLAG_LOOP;
return Sound()->PlayAt(Chn, SampleId, Flags, Pos.x, Pos.y);
return Sound()->PlayAt(Channel, SampleId, Flags, Pos.x, Pos.y);
}

View file

@ -500,7 +500,7 @@ public:
class CTeamsCore m_Teams;
int IntersectCharacter(vec2 Pos0, vec2 Pos1, vec2 &NewPos, int ownID);
int IntersectCharacter(vec2 HookPos, vec2 NewPos, vec2 &NewPos2, int ownID);
virtual int GetLastRaceTick();

View file

@ -67,7 +67,7 @@ public:
bool m_IsLocal;
CTeamsCore *TeamsCore();
bool Freeze(int Time);
bool Freeze(int Seconds);
bool Freeze();
bool UnFreeze();
void GiveAllWeapons();

View file

@ -21,7 +21,7 @@ public:
vec2 Pos,
vec2 Dir,
int Span,
bool Freeeze,
bool Freeze,
bool Explosive,
float Force,
int SoundImpact,

View file

@ -287,9 +287,9 @@ CTuningParams *CGameWorld::Tuning()
return &m_Core.m_Tuning[g_Config.m_ClDummy];
}
CEntity *CGameWorld::GetEntity(int ID, int EntType)
CEntity *CGameWorld::GetEntity(int ID, int EntityType)
{
for(CEntity *pEnt = m_apFirstEntityTypes[EntType]; pEnt; pEnt = pEnt->m_pNextTypeEntity)
for(CEntity *pEnt = m_apFirstEntityTypes[EntityType]; pEnt; pEnt = pEnt->m_pNextTypeEntity)
if(pEnt->m_ID == ID)
return pEnt;
return 0;

View file

@ -476,34 +476,34 @@ void CRenderTools::DrawRoundRect(float x, float y, float w, float h, float r)
DrawRoundRectExt(x, y, w, h, r, 0xf);
}
void CRenderTools::DrawUIRect(const CUIRect *r, ColorRGBA Color, int Corners, float Rounding)
void CRenderTools::DrawUIRect(const CUIRect *pRect, ColorRGBA Color, int Corners, float Rounding)
{
Graphics()->TextureClear();
// TODO: FIX US
Graphics()->QuadsBegin();
Graphics()->SetColor(Color);
DrawRoundRectExt(r->x, r->y, r->w, r->h, Rounding * UI()->Scale(), Corners);
DrawRoundRectExt(pRect->x, pRect->y, pRect->w, pRect->h, Rounding * UI()->Scale(), Corners);
Graphics()->QuadsEnd();
}
void CRenderTools::DrawUIRect4(const CUIRect *r, vec4 ColorTopLeft, vec4 ColorTopRight, vec4 ColorBottomLeft, vec4 ColorBottomRight, int Corners, float Rounding)
void CRenderTools::DrawUIRect4(const CUIRect *pRect, vec4 ColorTopLeft, vec4 ColorTopRight, vec4 ColorBottomLeft, vec4 ColorBottomRight, int Corners, float Rounding)
{
Graphics()->TextureClear();
Graphics()->QuadsBegin();
DrawRoundRectExt4(r->x, r->y, r->w, r->h, ColorTopLeft, ColorTopRight, ColorBottomLeft, ColorBottomRight, Rounding, Corners);
DrawRoundRectExt4(pRect->x, pRect->y, pRect->w, pRect->h, ColorTopLeft, ColorTopRight, ColorBottomLeft, ColorBottomRight, Rounding, Corners);
Graphics()->QuadsEnd();
}
void CRenderTools::DrawUIRect4NoRounding(const CUIRect *r, vec4 ColorTopLeft, vec4 ColorTopRight, vec4 ColorBottomLeft, vec4 ColorBottomRight)
void CRenderTools::DrawUIRect4NoRounding(const CUIRect *pRect, vec4 ColorTopLeft, vec4 ColorTopRight, vec4 ColorBottomLeft, vec4 ColorBottomRight)
{
Graphics()->TextureClear();
Graphics()->QuadsBegin();
Graphics()->SetColor4(ColorTopLeft, ColorTopRight, ColorBottomLeft, ColorBottomRight);
IGraphics::CQuadItem ItemQ = IGraphics::CQuadItem(r->x, r->y, r->w, r->h);
IGraphics::CQuadItem ItemQ = IGraphics::CQuadItem(pRect->x, pRect->y, pRect->w, pRect->h);
Graphics()->QuadsDrawTL(&ItemQ, 1);
Graphics()->QuadsEnd();

View file

@ -129,11 +129,11 @@ public:
// DDRace
void RenderTeleOverlay(CTeleTile *pTele, int w, int h, float Scale, float Alpha = 1.0f);
void RenderSpeedupOverlay(CSpeedupTile *pTele, int w, int h, float Scale, float Alpha = 1.0f);
void RenderSpeedupOverlay(CSpeedupTile *pSpeedup, int w, int h, float Scale, float Alpha = 1.0f);
void RenderSwitchOverlay(CSwitchTile *pSwitch, int w, int h, float Scale, float Alpha = 1.0f);
void RenderTuneOverlay(CTuneTile *pTune, int w, int h, float Scale, float Alpha = 1.0f);
void RenderTelemap(CTeleTile *pTele, int w, int h, float Scale, ColorRGBA Color, int RenderFlags);
void RenderSpeedupmap(CSpeedupTile *pTele, int w, int h, float Scale, ColorRGBA Color, int RenderFlags);
void RenderSpeedupmap(CSpeedupTile *pSpeedup, int w, int h, float Scale, ColorRGBA Color, int RenderFlags);
void RenderSwitchmap(CSwitchTile *pSwitch, int w, int h, float Scale, ColorRGBA Color, int RenderFlags);
void RenderTunemap(CTuneTile *pTune, int w, int h, float Scale, ColorRGBA Color, int RenderFlags);
};

View file

@ -204,11 +204,11 @@ float CUIRect::Scale() const
return g_Config.m_UiScale / 100.0f;
}
void CUI::ClipEnable(const CUIRect *r)
void CUI::ClipEnable(const CUIRect *pRect)
{
float XScale = Graphics()->ScreenWidth() / Screen()->w;
float YScale = Graphics()->ScreenHeight() / Screen()->h;
Graphics()->ClipEnable((int)(r->x * XScale), (int)(r->y * YScale), (int)(r->w * XScale), (int)(r->h * YScale));
Graphics()->ClipEnable((int)(pRect->x * XScale), (int)(pRect->y * YScale), (int)(pRect->w * XScale), (int)(pRect->h * YScale));
}
void CUI::ClipDisable()
@ -507,14 +507,14 @@ float CUI::DoTextLabel(float x, float y, float w, float h, const char *pText, fl
return tw;
}
void CUI::DoLabel(const CUIRect *r, const char *pText, float Size, int Align, float MaxWidth, int AlignVertically, CTextCursor *pSelCursor)
void CUI::DoLabel(const CUIRect *pRect, const char *pText, float Size, int Align, float MaxWidth, int AlignVertically, CTextCursor *pSelCursor)
{
DoTextLabel(r->x, r->y, r->w, r->h, pText, Size, Align, MaxWidth, AlignVertically, false, pSelCursor);
DoTextLabel(pRect->x, pRect->y, pRect->w, pRect->h, pText, Size, Align, MaxWidth, AlignVertically, false, pSelCursor);
}
void CUI::DoLabelScaled(const CUIRect *r, const char *pText, float Size, int Align, float MaxWidth, int AlignVertically)
void CUI::DoLabelScaled(const CUIRect *pRect, const char *pText, float Size, int Align, float MaxWidth, int AlignVertically)
{
DoLabel(r, pText, Size * Scale(), Align, MaxWidth, AlignVertically);
DoLabel(pRect, pText, Size * Scale(), Align, MaxWidth, AlignVertically);
}
void CUI::DoLabel(CUIElement::SUIElementRect &RectEl, const CUIRect *pRect, const char *pText, float Size, int Align, float MaxWidth, int AlignVertically, bool StopAtEnd, int StrLen, CTextCursor *pReadCursor)

View file

@ -1352,7 +1352,7 @@ void CEditor::DoSoundSource(CSoundSource *pSource, int Index)
Graphics()->QuadsDraw(&QuadItem, 1);
}
void CEditor::DoQuad(CQuad *q, int Index)
void CEditor::DoQuad(CQuad *pQuad, int Index)
{
enum
{
@ -1365,7 +1365,7 @@ void CEditor::DoQuad(CQuad *q, int Index)
};
// some basic values
void *pID = &q->m_aPoints[4]; // use pivot addr as id
void *pID = &pQuad->m_aPoints[4]; // use pivot addr as id
static array<array<CPoint>> s_lRotatePoints;
static int s_Operation = OP_NONE;
static float s_RotateAngle = 0;
@ -1373,8 +1373,8 @@ void CEditor::DoQuad(CQuad *q, int Index)
float wy = UI()->MouseWorldY();
// get pivot
float CenterX = fx2f(q->m_aPoints[4].x);
float CenterY = fx2f(q->m_aPoints[4].y);
float CenterX = fx2f(pQuad->m_aPoints[4].x);
float CenterY = fx2f(pQuad->m_aPoints[4].y);
float dx = (CenterX - wx) / m_WorldZoom;
float dy = (CenterY - wy) / m_WorldZoom;
@ -1417,13 +1417,13 @@ void CEditor::DoQuad(CQuad *q, int Index)
else
y = (int)((wy - (LineDistance / 2) * m_GridFactor) / (LineDistance * m_GridFactor)) * (LineDistance * m_GridFactor);
q->m_aPoints[4].x = f2fx(x);
q->m_aPoints[4].y = f2fx(y);
pQuad->m_aPoints[4].x = f2fx(x);
pQuad->m_aPoints[4].y = f2fx(y);
}
else
{
q->m_aPoints[4].x = f2fx(wx);
q->m_aPoints[4].y = f2fx(wy);
pQuad->m_aPoints[4].x = f2fx(wx);
pQuad->m_aPoints[4].y = f2fx(wy);
}
}
else if(s_Operation == OP_MOVE_ALL)
@ -1445,8 +1445,8 @@ void CEditor::DoQuad(CQuad *q, int Index)
else
y = (int)((wy - (LineDistance / 2) * m_GridFactor) / (LineDistance * m_GridFactor)) * (LineDistance * m_GridFactor);
int OffsetX = f2fx(x) - q->m_aPoints[4].x;
int OffsetY = f2fx(y) - q->m_aPoints[4].y;
int OffsetX = f2fx(x) - pQuad->m_aPoints[4].x;
int OffsetY = f2fx(y) - pQuad->m_aPoints[4].y;
for(int i = 0; i < m_lSelectedQuads.size(); ++i)
{
@ -1460,8 +1460,8 @@ void CEditor::DoQuad(CQuad *q, int Index)
}
else
{
int OffsetX = f2fx(wx) - q->m_aPoints[4].x;
int OffsetY = f2fx(wy) - q->m_aPoints[4].y;
int OffsetX = f2fx(wx) - pQuad->m_aPoints[4].x;
int OffsetY = f2fx(wy) - pQuad->m_aPoints[4].y;
for(int i = 0; i < m_lSelectedQuads.size(); ++i)
{

View file

@ -976,7 +976,7 @@ public:
void RenderGrid(CLayerGroup *pGroup);
void UiInvokePopupMenu(void *pID, int Flags, float X, float Y, float W, float H, int (*pfnFunc)(CEditor *pEditor, CUIRect Rect, void *pContext), void *pExtra = 0);
void UiInvokePopupMenu(void *pID, int Flags, float X, float Y, float W, float H, int (*pfnFunc)(CEditor *pEditor, CUIRect Rect, void *pContext), void *pContext = 0);
void UiDoPopupMenu();
bool UiPopupExists(void *pID);
bool UiPopupOpen();

View file

@ -186,7 +186,7 @@ public:
void FillAntibot(CAntibotCharacterData *pData);
void Pause(bool Pause);
bool Freeze(int Time);
bool Freeze(int Seconds);
bool Freeze();
bool UnFreeze();
void GiveAllWeapons();

View file

@ -25,7 +25,7 @@ public:
virtual void Reset();
virtual void Tick();
virtual void Snap(int snapping_client);
virtual void Snap(int SnappingClient);
};
class CDraggerTeam

View file

@ -15,7 +15,7 @@ public:
vec2 Pos,
vec2 Dir,
int Span,
bool Freeeze,
bool Freeze,
bool Explosive,
float Force,
int SoundImpact,

View file

@ -145,7 +145,7 @@ public:
// DDRace
bool GetNearestAirPos(vec2 Pos, vec2 ColPos, vec2 *pOutPos);
bool GetNearestAirPos(vec2 Pos, vec2 PrevPos, vec2 *pOutPos);
bool GetNearestAirPosPlayer(vec2 PlayerPos, vec2 *OutPos);
int m_Number;

View file

@ -197,7 +197,7 @@ public:
void CreateExplosion(vec2 Pos, int Owner, int Weapon, bool NoDamage, int ActivatedTeam, int64_t Mask);
void CreateHammerHit(vec2 Pos, int64_t Mask = -1);
void CreatePlayerSpawn(vec2 Pos, int64_t Mask = -1);
void CreateDeath(vec2 Pos, int Who, int64_t Mask = -1);
void CreateDeath(vec2 Pos, int ClientID, int64_t Mask = -1);
void CreateSound(vec2 Pos, int Sound, int64_t Mask = -1);
void CreateSoundGlobal(int Sound, int Target = -1);
@ -215,7 +215,7 @@ public:
};
// network
void CallVote(int ClientID, const char *aDesc, const char *aCmd, const char *pReason, const char *aChatmsg, const char *pSixupDesc = 0);
void CallVote(int ClientID, const char *pDesc, const char *pCmd, const char *pReason, const char *pChatmsg, const char *pSixupDesc = 0);
void SendChatTarget(int To, const char *pText, int Flags = CHAT_SIX | CHAT_SIXUP);
void SendChatTeam(int Team, const char *pText);
void SendChat(int ClientID, int Team, const char *pText, int SpamProtectionClientID = -1, int Flags = CHAT_SIX | CHAT_SIXUP);

View file

@ -131,7 +131,7 @@ public:
virtual void Snap(int SnappingClient);
//spawn
virtual bool CanSpawn(int Team, vec2 *pPos);
virtual bool CanSpawn(int Team, vec2 *pOutPos);
virtual void DoTeamChange(class CPlayer *pPlayer, int Team, bool DoChatMsg = true);
/*

View file

@ -34,7 +34,7 @@ public:
int GetTeam() const { return m_Team; };
int GetCID() const { return m_ClientID; };
int GetClientVersion() const;
bool SetTimerType(int NewType);
bool SetTimerType(int TimerType);
void Tick();
void PostTick();

View file

@ -129,7 +129,7 @@ public:
static bool HandleSaveError(int Result, int ClientID, CGameContext *pGameContext);
private:
CCharacter *MatchCharacter(int ClientID, int SaveID, bool KeepCurrentWeakStrong);
CCharacter *MatchCharacter(int ClientID, int SaveID, bool KeepCurrentCharacter);
IGameController *m_pController;

View file

@ -158,19 +158,19 @@ void CScore::SaveScore(int ClientID, float Time, const char *pTimestamp, float C
m_pPool->ExecuteWrite(CScoreWorker::SaveScore, std::move(Tmp), "save score");
}
void CScore::SaveTeamScore(int *aClientIDs, unsigned int Size, float Time, const char *pTimestamp)
void CScore::SaveTeamScore(int *pClientIDs, unsigned int Size, float Time, const char *pTimestamp)
{
CConsole *pCon = (CConsole *)GameServer()->Console();
if(pCon->m_Cheated)
return;
for(unsigned int i = 0; i < Size; i++)
{
if(GameServer()->m_apPlayers[aClientIDs[i]]->m_NotEligibleForFinish)
if(GameServer()->m_apPlayers[pClientIDs[i]]->m_NotEligibleForFinish)
return;
}
auto Tmp = std::unique_ptr<CSqlTeamScoreData>(new CSqlTeamScoreData());
for(unsigned int i = 0; i < Size; i++)
str_copy(Tmp->m_aaNames[i], Server()->ClientName(aClientIDs[i]), sizeof(Tmp->m_aaNames[i]));
str_copy(Tmp->m_aaNames[i], Server()->ClientName(pClientIDs[i]), sizeof(Tmp->m_aaNames[i]));
Tmp->m_Size = Size;
Tmp->m_Time = Time;
str_copy(Tmp->m_aTimestamp, pTimestamp, sizeof(Tmp->m_aTimestamp));

View file

@ -91,7 +91,7 @@ public:
// returns nullptr if successful, error string if failed
const char *SetCharacterTeam(int ClientID, int Team);
void CheckTeamFinished(int ClientID);
void CheckTeamFinished(int Team);
void ChangeTeamState(int Team, int State);