diff --git a/code/cgame/cg_camera.cpp b/code/cgame/cg_camera.cpp index 0b489db..1c7418f 100644 --- a/code/cgame/cg_camera.cpp +++ b/code/cgame/cg_camera.cpp @@ -1248,7 +1248,8 @@ void CGCam_UpdateShake( vec3_t origin, vec3_t angles ) intensity = client_camera.shake_intensity * intensity_scale; - for ( int i = 0; i < 3; i++ ) + int i; + for ( i = 0; i < 3; i++ ) { moveDir[i] = ( crandom() * intensity ); } diff --git a/code/cgame/cg_weapons.cpp b/code/cgame/cg_weapons.cpp index 3ef351f..0657316 100644 --- a/code/cgame/cg_weapons.cpp +++ b/code/cgame/cg_weapons.cpp @@ -1152,7 +1152,8 @@ void CG_AddViewWeapon( playerState_t *ps ) } */ // add the spinning barrel[s] - for (int i = 0; (i < wData->numBarrels); i++) + int i; + for (i = 0; (i < wData->numBarrels); i++) { refEntity_t barrel; memset( &barrel, 0, sizeof( barrel ) ); diff --git a/code/client/snd_dma.cpp b/code/client/snd_dma.cpp index 9345053..6ce257d 100644 --- a/code/client/snd_dma.cpp +++ b/code/client/snd_dma.cpp @@ -4316,7 +4316,8 @@ void S_StartBackgroundTrack( const char *intro, const char *loop, qboolean bCall { extern const char *Music_GetLevelSetName(void); Q_strncpyz(sInfoOnly_CurrentDynamicMusicSet, Music_GetLevelSetName(), sizeof(sInfoOnly_CurrentDynamicMusicSet)); - for (int i = eBGRNDTRACK_DATABEGIN; i != eBGRNDTRACK_DATAEND; i++) + int i; + for (i = eBGRNDTRACK_DATABEGIN; i != eBGRNDTRACK_DATAEND; i++) { qboolean bOk = qfalse; LPCSTR psMusicName = Music_GetFileNameForState( (MusicState_e) i); @@ -4948,7 +4949,8 @@ int SND_FreeOldestSound(sfx_t *pButNotThisOne /* = NULL */) { // new bit, we can't throw away any sfx_t struct in use by a channel, else the paint code will crash... // - for (int iChannel=0; iChannelnumGroup; i++ ) + int i; + for ( i = 0; i < group->numGroup; i++ ) { if ( group->member[i].number == member->s.number ) {//already in here diff --git a/code/game/NPC_utils.cpp b/code/game/NPC_utils.cpp index 92978e0..74b7637 100644 --- a/code/game/NPC_utils.cpp +++ b/code/game/NPC_utils.cpp @@ -1030,7 +1030,8 @@ int NPC_FindNearestEnemy( gentity_t *ent ) int numEnts, numChecks = 0; //Setup the bbox to search in - for ( int i = 0; i < 3; i++ ) + int i; + for ( i = 0; i < 3; i++ ) { mins[i] = ent->currentOrigin[i] - NPCInfo->stats.visrange; maxs[i] = ent->currentOrigin[i] + NPCInfo->stats.visrange; diff --git a/code/game/g_client.cpp b/code/game/g_client.cpp index 537f2f3..27c7730 100644 --- a/code/game/g_client.cpp +++ b/code/game/g_client.cpp @@ -620,7 +620,8 @@ void Player_CacheFromPrevLevel(void) &ibits //client->ps.stats[STAT_ITEMS] ); - for ( int i = 1 ; i < 16 ; i++ ) + int i; + for ( i = 1 ; i < 16 ; i++ ) { if ( bits & ( 1 << i ) ) { @@ -1805,4 +1806,4 @@ void ClientDisconnect( int clientNum ) { } - \ No newline at end of file + diff --git a/code/game/g_combat.cpp b/code/game/g_combat.cpp index f30a08a..0f27ad0 100644 --- a/code/game/g_combat.cpp +++ b/code/game/g_combat.cpp @@ -412,7 +412,8 @@ void G_AlertTeam( gentity_t *victim, gentity_t *attacker, float radius, float so return; //Setup the bbox to search in - for ( int i = 0; i < 3; i++ ) + int i; + for ( i = 0; i < 3; i++ ) { mins[i] = victim->currentOrigin[i] - radius; maxs[i] = victim->currentOrigin[i] + radius; diff --git a/code/game/g_navigator.cpp b/code/game/g_navigator.cpp index 25f9121..e5fc1c0 100644 --- a/code/game/g_navigator.cpp +++ b/code/game/g_navigator.cpp @@ -348,7 +348,8 @@ int CNode::Save( int numNodes, fileHandle_t file ) gi.FS_Write( &header, sizeof( header ), file ); //Write out the basic information - for ( int i = 0; i < 3; i++ ) + int i; + for ( i = 0; i < 3; i++ ) gi.FS_Write( &m_position[i], sizeof( float ), file ); gi.FS_Write( &m_flags, sizeof( m_flags ), file ); @@ -391,7 +392,8 @@ int CNode::Load( int numNodes, fileHandle_t file ) return false; //Get the basic information - for ( int i = 0; i < 3; i++ ) + int i; + for ( i = 0; i < 3; i++ ) gi.FS_Read( &m_position[i], sizeof( float ), file ); gi.FS_Read( &m_flags, sizeof( m_flags ), file ); @@ -777,7 +779,8 @@ void CNavigator::CalculatePath( CNode *node ) node->AddRank( node->GetID(), curRank++ ); //Add all initial nodes - for ( int i = 0; i < node->GetNumEdges(); i++ ) + int i; + for ( i = 0; i < node->GetNumEdges(); i++ ) { CNode *nextNode = m_nodes[ node->GetEdge(i) ]; assert(nextNode); @@ -840,7 +843,8 @@ void CNavigator::CalculatePaths( bool recalc ) #else #endif - for ( int i = 0; i < m_nodes.size(); i++ ) + int i; + for ( i = 0; i < m_nodes.size(); i++ ) { //Allocate the needed memory m_nodes[i]->InitRanks( m_nodes.size() ); diff --git a/code/game/g_roff.cpp b/code/game/g_roff.cpp index 0bc81db..92cfcc3 100644 --- a/code/game/g_roff.cpp +++ b/code/game/g_roff.cpp @@ -320,7 +320,8 @@ qboolean G_InitRoff( char *file, unsigned char *data ) roffs[num_roffs].type = 2; //rww - any reason this wasn't being set already? // Copy all of the goods into our ROFF cache - for ( int i = 0; i < count; i++ ) + int i; + for ( i = 0; i < count; i++ ) { VectorCopy( roff_data[i].origin_delta, mem[i].origin_delta ); VectorCopy( roff_data[i].rotate_delta, mem[i].rotate_delta ); diff --git a/code/game/g_savegame.cpp b/code/game/g_savegame.cpp index 3af98d0..0f07715 100644 --- a/code/game/g_savegame.cpp +++ b/code/game/g_savegame.cpp @@ -627,7 +627,8 @@ void WriteGEntities(qboolean qbAutosave) { int iCount = 0; - for (int i=0; i<(qbAutosave?1:globals.num_entities); i++) + int i; + for (i=0; i<(qbAutosave?1:globals.num_entities); i++) { gentity_t* ent = &g_entities[i]; @@ -721,7 +722,8 @@ void ReadGEntities(qboolean qbAutosave) gi.ReadFromSaveGame('NMED', (void *)&iCount, sizeof(iCount)); int iPreviousEntRead = -1; - for (int i=0; iclient->ps.forceGripEntityNum = ENTITYNUM_NONE; } -} \ No newline at end of file +} diff --git a/code/ghoul2/G2_misc.cpp b/code/ghoul2/G2_misc.cpp index 923f25e..e1d4dfe 100644 --- a/code/ghoul2/G2_misc.cpp +++ b/code/ghoul2/G2_misc.cpp @@ -552,7 +552,8 @@ static bool G2_TracePolys(const mdxmSurface_t *surface, const mdxmSurfHierarchy_ // did we hit it? if (G2_SegmentTriangleTest(TS.rayStart, TS.rayEnd, point1, point2, point3, qtrue, qtrue, hitPoint, normal, &face)) { // find space in the collision records for this record - for (int i=0; iGetInterface())->I_ReadSaveData( 'SNCH', &m_numChildren, sizeof( m_numChildren ) ); //Reload all children - for ( int i = 0; i < m_numChildren; i++ ) + int i; + for ( i = 0; i < m_numChildren; i++ ) { //Get the child sequence ID (m_owner->GetInterface())->I_ReadSaveData( 'SCHD', &id, sizeof( id ) ); diff --git a/code/icarus/Sequencer.cpp b/code/icarus/Sequencer.cpp index f8c076e..5955dfe 100644 --- a/code/icarus/Sequencer.cpp +++ b/code/icarus/Sequencer.cpp @@ -2400,7 +2400,8 @@ int CSequencer::Load( void ) m_ie->I_ReadSaveData( 'SQR#', &numSequences, sizeof( numSequences ) ); //Read in all the sequences - for ( int i = 0; i < numSequences; i++ ) + int i; + for ( i = 0; i < numSequences; i++ ) { m_ie->I_ReadSaveData( 'SQRI', &seqID, sizeof( seqID ) ); diff --git a/code/icarus/TaskManager.cpp b/code/icarus/TaskManager.cpp index af60767..6c1a6b2 100644 --- a/code/icarus/TaskManager.cpp +++ b/code/icarus/TaskManager.cpp @@ -1800,7 +1800,8 @@ void CTaskManager::Load( void ) (m_owner->GetInterface())->I_ReadSaveData( 'TSK#', &numTasks, sizeof( numTasks ) ); //Reload all the tasks - for ( int i = 0; i < numTasks; i++ ) + int i; + for ( i = 0; i < numTasks; i++ ) { task = new CTask; diff --git a/code/renderer/tr_draw.cpp b/code/renderer/tr_draw.cpp index d3cc95b..2ffba36 100644 --- a/code/renderer/tr_draw.cpp +++ b/code/renderer/tr_draw.cpp @@ -815,7 +815,8 @@ qboolean RE_InitDissolve(qboolean bForceCircularExtroWipe) // // do it... // - for (int y = 0; y < glConfig.vidHeight; y++) + int y; + for (y = 0; y < glConfig.vidHeight; y++) { pbDst -= iClearBytes; memset(pbDst,0,iClearBytes); @@ -845,7 +846,8 @@ qboolean RE_InitDissolve(qboolean bForceCircularExtroWipe) // Now, in case of busted drivers, 3DFX cards, etc etc we stomp the alphas to 255... // byte *pPix = pBuffer; - for (int i=0; i