server: fix Stupid MSVC6 Bug
This commit is contained in:
parent
23b1b76dce
commit
15b17af683
@ -329,7 +329,8 @@ float SetController( void *pmodel, entvars_t *pev, int iController, float flValu
|
|||||||
mstudiobonecontroller_t *pbonecontroller = (mstudiobonecontroller_t *)((byte *)pstudiohdr + pstudiohdr->bonecontrollerindex);
|
mstudiobonecontroller_t *pbonecontroller = (mstudiobonecontroller_t *)((byte *)pstudiohdr + pstudiohdr->bonecontrollerindex);
|
||||||
|
|
||||||
// find first controller that matches the index
|
// find first controller that matches the index
|
||||||
for (int i = 0; i < pstudiohdr->numbonecontrollers; i++, pbonecontroller++)
|
int i;
|
||||||
|
for (i = 0; i < pstudiohdr->numbonecontrollers; i++, pbonecontroller++)
|
||||||
{
|
{
|
||||||
if (pbonecontroller->index == iController)
|
if (pbonecontroller->index == iController)
|
||||||
break;
|
break;
|
||||||
@ -524,4 +525,4 @@ int GetBodygroup( void *pmodel, entvars_t *pev, int iGroup )
|
|||||||
int iCurrent = (pev->body / pbodypart->base) % pbodypart->nummodels;
|
int iCurrent = (pev->body / pbodypart->base) % pbodypart->nummodels;
|
||||||
|
|
||||||
return iCurrent;
|
return iCurrent;
|
||||||
}
|
}
|
||||||
|
@ -301,7 +301,8 @@ void Host_Say( edict_t *pEntity, int teamonly )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// make sure the text has content
|
// make sure the text has content
|
||||||
for ( char *pc = p; pc != NULL && *pc != 0; pc++ )
|
char *pc;
|
||||||
|
for ( pc = p; pc != NULL && *pc != 0; pc++ )
|
||||||
{
|
{
|
||||||
if ( isprint( *pc ) && !isspace( *pc ) )
|
if ( isprint( *pc ) && !isspace( *pc ) )
|
||||||
{
|
{
|
||||||
|
@ -655,7 +655,8 @@ int CGraph :: FindShortestPath ( int *piPath, int iStart, int iDest, int iHull,
|
|||||||
|
|
||||||
// Mark all the nodes as unvisited.
|
// Mark all the nodes as unvisited.
|
||||||
//
|
//
|
||||||
for ( int i = 0; i < m_cNodes; i++)
|
int i;
|
||||||
|
for ( i = 0; i < m_cNodes; i++)
|
||||||
{
|
{
|
||||||
m_pNodes[ i ].m_flClosestSoFar = -1.0;
|
m_pNodes[ i ].m_flClosestSoFar = -1.0;
|
||||||
}
|
}
|
||||||
@ -2732,7 +2733,8 @@ void CGraph::HashChoosePrimes(int TableSize)
|
|||||||
// We divide this interval into 16 equal sized zones. We want to find
|
// We divide this interval into 16 equal sized zones. We want to find
|
||||||
// one prime number that best represents that zone.
|
// one prime number that best represents that zone.
|
||||||
//
|
//
|
||||||
for (int iZone = 1, iPrime = 0; iPrime < 16; iZone += Spacing)
|
int iZone, iPrime;
|
||||||
|
for (iZone = 1, iPrime = 0; iPrime < 16; iZone += Spacing)
|
||||||
{
|
{
|
||||||
// Search for a prime number that is less than the target zone
|
// Search for a prime number that is less than the target zone
|
||||||
// number given by iZone.
|
// number given by iZone.
|
||||||
@ -2788,9 +2790,9 @@ void CGraph::SortNodes(void)
|
|||||||
// After assigning new node numbers to everything, we move
|
// After assigning new node numbers to everything, we move
|
||||||
// things and patchup the links.
|
// things and patchup the links.
|
||||||
//
|
//
|
||||||
int iNodeCnt = 0;
|
int iNodeCnt = 0, i;
|
||||||
m_pNodes[0].m_iPreviousNode = iNodeCnt++;
|
m_pNodes[0].m_iPreviousNode = iNodeCnt++;
|
||||||
for (int i = 1; i < m_cNodes; i++)
|
for (i = 1; i < m_cNodes; i++)
|
||||||
{
|
{
|
||||||
m_pNodes[i].m_iPreviousNode = UNNUMBERED_NODE;
|
m_pNodes[i].m_iPreviousNode = UNNUMBERED_NODE;
|
||||||
}
|
}
|
||||||
@ -2855,7 +2857,8 @@ void CGraph::BuildLinkLookups(void)
|
|||||||
ALERT(at_aiconsole, "Couldn't allocated Link Lookup Table.\n");
|
ALERT(at_aiconsole, "Couldn't allocated Link Lookup Table.\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (int i = 0; i < m_nHashLinks; i++)
|
int i;
|
||||||
|
for (i = 0; i < m_nHashLinks; i++)
|
||||||
{
|
{
|
||||||
m_pHashLinks[i] = ENTRY_STATE_EMPTY;
|
m_pHashLinks[i] = ENTRY_STATE_EMPTY;
|
||||||
}
|
}
|
||||||
@ -2895,7 +2898,8 @@ void CGraph::BuildRegionTables(void)
|
|||||||
// Calculate regions for all the nodes.
|
// Calculate regions for all the nodes.
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
for (int i = 0; i < 3; i++)
|
int i;
|
||||||
|
for (i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
m_RegionMin[i] = 999999999.0; // just a big number out there;
|
m_RegionMin[i] = 999999999.0; // just a big number out there;
|
||||||
m_RegionMax[i] = -999999999.0; // just a big number out there;
|
m_RegionMax[i] = -999999999.0; // just a big number out there;
|
||||||
@ -2925,7 +2929,8 @@ void CGraph::BuildRegionTables(void)
|
|||||||
|
|
||||||
for (i = 0; i < 3; i++)
|
for (i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
for (int j = 0; j < NUM_RANGES; j++)
|
int j;
|
||||||
|
for (j = 0; j < NUM_RANGES; j++)
|
||||||
{
|
{
|
||||||
m_RangeStart[i][j] = 255;
|
m_RangeStart[i][j] = 255;
|
||||||
m_RangeEnd[i][j] = 0;
|
m_RangeEnd[i][j] = 0;
|
||||||
@ -3059,7 +3064,8 @@ void CGraph :: ComputeStaticRoutingTables( void )
|
|||||||
|
|
||||||
// Initialize Routing table to uncalculated.
|
// Initialize Routing table to uncalculated.
|
||||||
//
|
//
|
||||||
for (int iFrom = 0; iFrom < m_cNodes; iFrom++)
|
int iFrom;
|
||||||
|
for (iFrom = 0; iFrom < m_cNodes; iFrom++)
|
||||||
{
|
{
|
||||||
for (int iTo = 0; iTo < m_cNodes; iTo++)
|
for (int iTo = 0; iTo < m_cNodes; iTo++)
|
||||||
{
|
{
|
||||||
@ -3275,7 +3281,8 @@ void CGraph :: ComputeStaticRoutingTables( void )
|
|||||||
int nRoute = p - pRoute;
|
int nRoute = p - pRoute;
|
||||||
if (m_pRouteInfo)
|
if (m_pRouteInfo)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < m_nRouteInfo - nRoute; i++)
|
int i;
|
||||||
|
for (i = 0; i < m_nRouteInfo - nRoute; i++)
|
||||||
{
|
{
|
||||||
if (memcmp(m_pRouteInfo + i, pRoute, nRoute) == 0)
|
if (memcmp(m_pRouteInfo + i, pRoute, nRoute) == 0)
|
||||||
{
|
{
|
||||||
@ -3367,7 +3374,8 @@ void CGraph :: TestRoutingTables( void )
|
|||||||
//
|
//
|
||||||
#if 1
|
#if 1
|
||||||
float flDistance1 = 0.0;
|
float flDistance1 = 0.0;
|
||||||
for (int i = 0; i < cPathSize1-1; i++)
|
int i;
|
||||||
|
for (i = 0; i < cPathSize1-1; i++)
|
||||||
{
|
{
|
||||||
// Find the link from pMyPath[i] to pMyPath[i+1]
|
// Find the link from pMyPath[i] to pMyPath[i+1]
|
||||||
//
|
//
|
||||||
@ -3421,7 +3429,8 @@ void CGraph :: TestRoutingTables( void )
|
|||||||
#endif
|
#endif
|
||||||
ALERT(at_aiconsole, "Routing is inconsistent!!!\n");
|
ALERT(at_aiconsole, "Routing is inconsistent!!!\n");
|
||||||
ALERT(at_aiconsole, "(%d to %d |%d/%d)1:", iFrom, iTo, iHull, iCap);
|
ALERT(at_aiconsole, "(%d to %d |%d/%d)1:", iFrom, iTo, iHull, iCap);
|
||||||
for (int i = 0; i < cPathSize1; i++)
|
int i;
|
||||||
|
for (i = 0; i < cPathSize1; i++)
|
||||||
{
|
{
|
||||||
ALERT(at_aiconsole, "%d ", pMyPath[i]);
|
ALERT(at_aiconsole, "%d ", pMyPath[i]);
|
||||||
}
|
}
|
||||||
|
@ -272,7 +272,8 @@ BOOL CPlayerInventory::SetInventory( int Slot, int Index )
|
|||||||
|
|
||||||
void CPlayerInventory::SpawnInventory( CBasePlayer *pPlayer )
|
void CPlayerInventory::SpawnInventory( CBasePlayer *pPlayer )
|
||||||
{
|
{
|
||||||
for( int i = 0;i < 5;i++ )
|
int i;
|
||||||
|
for( i = 0;i < 5;i++ )
|
||||||
{
|
{
|
||||||
playeritemlist_t *pList = GetListForSlot( i );
|
playeritemlist_t *pList = GetListForSlot( i );
|
||||||
int index;
|
int index;
|
||||||
|
Loading…
Reference in New Issue
Block a user