mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 14:38:18 +00:00
fixed some warnings
This commit is contained in:
parent
93651e7b54
commit
53de4b36b3
|
@ -640,9 +640,7 @@ void CServerBrowser::Update(bool ForceResort)
|
|||
// do server list requests
|
||||
if(m_NeedRefresh && !m_pMasterServer->IsRefreshing())
|
||||
{
|
||||
NETADDR Addr;
|
||||
CNetChunk Packet;
|
||||
int i;
|
||||
|
||||
m_NeedRefresh = 0;
|
||||
|
||||
|
@ -652,7 +650,7 @@ void CServerBrowser::Update(bool ForceResort)
|
|||
Packet.m_DataSize = sizeof(SERVERBROWSE_GETLIST);
|
||||
Packet.m_pData = SERVERBROWSE_GETLIST;
|
||||
|
||||
for(i = 0; i < IMasterServer::MAX_MASTERSERVERS; i++)
|
||||
for(int i = 0; i < IMasterServer::MAX_MASTERSERVERS; i++)
|
||||
{
|
||||
if(!m_pMasterServer->IsValid(i))
|
||||
continue;
|
||||
|
|
|
@ -299,7 +299,7 @@ class CTextRender : public IEngineTextRender
|
|||
int SlotSize = SlotW*SlotH;
|
||||
int x = 1;
|
||||
int y = 1;
|
||||
int px, py;
|
||||
unsigned int px, py;
|
||||
|
||||
FT_Set_Pixel_Sizes(pFont->m_FtFace, 0, pSizeData->m_FontSize);
|
||||
|
||||
|
@ -340,9 +340,9 @@ class CTextRender : public IEngineTextRender
|
|||
}
|
||||
}
|
||||
|
||||
if(0) for(py = 0; py < SlotW; py++)
|
||||
/*for(py = 0; py < SlotW; py++)
|
||||
for(px = 0; px < SlotH; px++)
|
||||
ms_aGlyphData[py*SlotW+px] = 255;
|
||||
ms_aGlyphData[py*SlotW+px] = 255;*/
|
||||
|
||||
// upload the glyph
|
||||
UploadGlyph(pSizeData, 0, SlotID, Chr, ms_aGlyphData);
|
||||
|
|
|
@ -1070,8 +1070,6 @@ void CServer::ProcessClientPacket(CNetChunk *pPacket)
|
|||
|
||||
void CServer::GenerateServerInfo(CPacker *pPacker, int Token)
|
||||
{
|
||||
char aBuf[128];
|
||||
|
||||
// count the players
|
||||
int PlayerCount = 0, ClientCount = 0;
|
||||
for(int i = 0; i < MAX_CLIENTS; i++)
|
||||
|
@ -1158,7 +1156,7 @@ void CServer::PumpNetwork()
|
|||
if(!(Packet.m_Flags&NETSENDFLAG_STATELESS))
|
||||
if(m_Register.RegisterProcessPacket(&Packet, ResponseToken))
|
||||
continue;
|
||||
if(Packet.m_DataSize >= sizeof(SERVERBROWSE_GETINFO) &&
|
||||
if(Packet.m_DataSize >= int(sizeof(SERVERBROWSE_GETINFO)) &&
|
||||
mem_comp(Packet.m_pData, SERVERBROWSE_GETINFO, sizeof(SERVERBROWSE_GETINFO)) == 0)
|
||||
{
|
||||
CUnpacker Unpacker;
|
||||
|
|
|
@ -333,7 +333,7 @@ void CCharacter::FireWeapon()
|
|||
|
||||
case WEAPON_GUN:
|
||||
{
|
||||
CProjectile *pProj = new CProjectile(GameWorld(), WEAPON_GUN,
|
||||
new CProjectile(GameWorld(), WEAPON_GUN,
|
||||
m_pPlayer->GetCID(),
|
||||
ProjStartPos,
|
||||
Direction,
|
||||
|
@ -354,7 +354,7 @@ void CCharacter::FireWeapon()
|
|||
a += Spreading[i+2];
|
||||
float v = 1-(absolute(i)/(float)ShotSpread);
|
||||
float Speed = mix((float)GameServer()->Tuning()->m_ShotgunSpeeddiff, 1.0f, v);
|
||||
CProjectile *pProj = new CProjectile(GameWorld(), WEAPON_SHOTGUN,
|
||||
new CProjectile(GameWorld(), WEAPON_SHOTGUN,
|
||||
m_pPlayer->GetCID(),
|
||||
ProjStartPos,
|
||||
vec2(cosf(a), sinf(a))*Speed,
|
||||
|
@ -367,7 +367,7 @@ void CCharacter::FireWeapon()
|
|||
|
||||
case WEAPON_GRENADE:
|
||||
{
|
||||
CProjectile *pProj = new CProjectile(GameWorld(), WEAPON_GRENADE,
|
||||
new CProjectile(GameWorld(), WEAPON_GRENADE,
|
||||
m_pPlayer->GetCID(),
|
||||
ProjStartPos,
|
||||
Direction,
|
||||
|
|
|
@ -306,7 +306,7 @@ bool IGameController::OnEntity(int Index, vec2 Pos)
|
|||
|
||||
if(Type != -1)
|
||||
{
|
||||
CPickup *pPickup = new CPickup(&GameServer()->m_World, Type, Pos);
|
||||
new CPickup(&GameServer()->m_World, Type, Pos);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue