diff --git a/cl_dll/death.cpp b/cl_dll/death.cpp index 48a256b..070f428 100644 --- a/cl_dll/death.cpp +++ b/cl_dll/death.cpp @@ -101,7 +101,8 @@ int CHudDeathNotice :: Draw( float flTime ) // How many death messages are there. - for( int i = 0;i < MAX_DEATHNOTICES; i++) + int i; + for( i = 0;i < MAX_DEATHNOTICES; i++) { if(rgDeathNoticeList[i].iId == 0) break; @@ -236,7 +237,8 @@ int CHudDeathNotice :: MsgFunc_DeathMsg( const char *pszName, int iSize, void *p gHUD.m_Spectator.DeathMessage(victim); - for ( int i = 0; i < MAX_DEATHNOTICES; i++ ) + int i; + for ( i = 0; i < MAX_DEATHNOTICES; i++ ) { if ( rgDeathNoticeList[i].iId == 0 ) break; diff --git a/cl_dll/health.cpp b/cl_dll/health.cpp index d52700d..3bd0892 100644 --- a/cl_dll/health.cpp +++ b/cl_dll/health.cpp @@ -385,7 +385,8 @@ int CHudHealth::DrawDamage(float flTime) ScaleColors(r, g, b, a); // Draw all the items - for (int i = 0; i < NUM_DMG_TYPES; i++) + int i; + for ( i = 0; i < NUM_DMG_TYPES; i++) { if (m_bitsDamage & giDmgFlags[i]) { diff --git a/cl_dll/hud.cpp b/cl_dll/hud.cpp index 6087f28..033ab25 100644 --- a/cl_dll/hud.cpp +++ b/cl_dll/hud.cpp @@ -424,7 +424,8 @@ void CHud :: VidInit( void ) // count the number of sprites of the appropriate res m_iSpriteCount = 0; client_sprite_t *p = m_pSpriteList; - for ( int j = 0; j < m_iSpriteCountAllRes; j++ ) + int j; + for ( j = 0; j < m_iSpriteCountAllRes; j++ ) { if ( p->iRes == m_iRes ) m_iSpriteCount++; diff --git a/cl_dll/hud_redraw.cpp b/cl_dll/hud_redraw.cpp index 6110d6f..742f7fd 100644 --- a/cl_dll/hud_redraw.cpp +++ b/cl_dll/hud_redraw.cpp @@ -220,7 +220,8 @@ int CHud :: DrawHudNumberString( int xpos, int ypos, int iMinX, int iNumber, int int CHud :: DrawHudStringReverse( int xpos, int ypos, int iMinX, char *szString, int r, int g, int b ) { // find the end of the string - for ( char *szIt = szString; *szIt != 0; szIt++ ) + char *szIt; + for ( szIt = szString; *szIt != 0; szIt++ ) { // we should count the length? } diff --git a/cl_dll/menu.cpp b/cl_dll/menu.cpp index 38e6d03..8de3726 100644 --- a/cl_dll/menu.cpp +++ b/cl_dll/menu.cpp @@ -84,8 +84,8 @@ int CHudMenu :: Draw( float flTime ) // draw the menu, along the left-hand side of the screen // count the number of newlines - int nlc = 0; - for ( int i = 0; i < MAX_MENU_STRING && g_szMenuString[i] != '\0'; i++ ) + int nlc = 0, i; + for ( i = 0; i < MAX_MENU_STRING && g_szMenuString[i] != '\0'; i++ ) { if ( g_szMenuString[i] == '\n' ) nlc++; diff --git a/cl_dll/saytext.cpp b/cl_dll/saytext.cpp index 65b8a16..b892e53 100644 --- a/cl_dll/saytext.cpp +++ b/cl_dll/saytext.cpp @@ -174,7 +174,8 @@ void CHudSayText :: SayTextPrint( const char *pszBuf, int iBufSize, int clientIn } // find an empty string slot - for ( int i = 0; i < MAX_LINES; i++ ) + int i; + for ( i = 0; i < MAX_LINES; i++ ) { if ( ! *g_szLineBuffer[i] ) break; diff --git a/cl_dll/tri.cpp b/cl_dll/tri.cpp index a4dd651..a2f7786 100644 --- a/cl_dll/tri.cpp +++ b/cl_dll/tri.cpp @@ -336,7 +336,8 @@ void DLLEXPORT HUD_DrawTransparentTriangles( void ) g_ParticleSystemManager.RenderTransparent(); // Render laser beams - for(int i = 0;i < gEngfuncs.GetMaxClients();i++) + int i; + for(i = 0;i < gEngfuncs.GetMaxClients();i++) { cl_entity_t *player = gEngfuncs.GetEntityByIndex(i); if(player != NULL && g_iClientLasersEnabled[i]) diff --git a/cl_dll/vgui_ItemSelection.cpp b/cl_dll/vgui_ItemSelection.cpp index 110ab0f..f0c3aad 100644 --- a/cl_dll/vgui_ItemSelection.cpp +++ b/cl_dll/vgui_ItemSelection.cpp @@ -275,9 +275,9 @@ public: void BuildButtons() { - int iButtonPosY = LIST_BUTTON_Y; + int iButtonPosY = LIST_BUTTON_Y, i; - for( int i = 0;i < m_pItemArray->size; i++ ) + for( i = 0;i < m_pItemArray->size; i++ ) { playeritem_t *pItem = &m_pItemArray->array[i]; ItemButtonShaded *newButton; diff --git a/cl_dll/vgui_ScorePanel.cpp b/cl_dll/vgui_ScorePanel.cpp index 578fab1..41752dc 100644 --- a/cl_dll/vgui_ScorePanel.cpp +++ b/cl_dll/vgui_ScorePanel.cpp @@ -276,7 +276,8 @@ void ScorePanel::Update() void ScorePanel::SortTeams() { // clear out team scores - for ( int i = 1; i <= m_iNumTeams; i++ ) + int i; + for ( i = 1; i <= m_iNumTeams; i++ ) { if ( !g_TeamInfo[i].scores_overriden ) g_TeamInfo[i].frags = g_TeamInfo[i].deaths = 0; @@ -293,7 +294,8 @@ void ScorePanel::SortTeams() continue; // skip over players who are not in a team // find what team this player is in - for ( int j = 1; j <= m_iNumTeams; j++ ) + int j; + for ( j = 1; j <= m_iNumTeams; j++ ) { if ( !stricmp( g_PlayerExtraInfo[i].teamname, g_TeamInfo[j].name ) ) break; @@ -435,7 +437,8 @@ void ScorePanel::SortPlayers( int iTeam, char *team ) void ScorePanel::RebuildTeams() { // clear out player counts from teams - for ( int i = 1; i <= m_iNumTeams; i++ ) + int i; + for ( i = 1; i <= m_iNumTeams; i++ ) { g_TeamInfo[i].players = 0; } @@ -452,7 +455,8 @@ void ScorePanel::RebuildTeams() continue; // skip over players who are not in a team // is this player in an existing team? - for ( int j = 1; j <= m_iNumTeams; j++ ) + int j; + for ( j = 1; j <= m_iNumTeams; j++ ) { if ( g_TeamInfo[j].name[0] == '\0' ) break; @@ -513,8 +517,8 @@ void ScorePanel::FillGrid() } bool bNextRowIsGap = false; - - for(int row=0; row < NUM_ROWS; row++) + int row; + for(row=0; row < NUM_ROWS; row++) { CGrid *pGridRow = &m_PlayerGrids[row]; pGridRow->SetRowUnderline(0, false, 0, 0, 0, 0, 0); diff --git a/cl_dll/vgui_TheWastesViewport.cpp b/cl_dll/vgui_TheWastesViewport.cpp index d3128e5..dd0c481 100644 --- a/cl_dll/vgui_TheWastesViewport.cpp +++ b/cl_dll/vgui_TheWastesViewport.cpp @@ -1831,7 +1831,8 @@ int TheWastesViewport::MsgFunc_TeamScore( const char *pszName, int iSize, void * char *TeamName = READ_STRING(); // find the team matching the name - for ( int i = 1; i <= m_pScoreBoard->m_iNumTeams; i++ ) + int i; + for ( i = 1; i <= m_pScoreBoard->m_iNumTeams; i++ ) { if ( !stricmp( TeamName, g_TeamInfo[i].name ) ) break;