1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2025-09-19 20:16:10 +08:00

Modified SDK for GCC 4.2

This commit is contained in:
Scott Ehlert
2008-09-15 02:50:57 -05:00
parent 86f3bc8a60
commit 7ff7f366d5
696 changed files with 23423 additions and 22634 deletions

View File

@ -62,11 +62,11 @@ extern Vector g_vecAttackDir;
"item_rpg_round", // 12
"unused (item_smg1_grenade) 13",// 13
"item_box_sniper_rounds", // 14
"unused (???) 15", // 15
"unused (?) 15", // 15
"weapon_stunstick", // 16
"unused (weapon_ar1) 17", // 17
"weapon_ar2", // 18
"unused (???) 19", // 19
"unused (?) 19", // 19
"weapon_rpg", // 20
"weapon_smg1", // 21
"unused (weapon_smg2) 22", // 22
@ -218,13 +218,13 @@ bool CBreakable::KeyValue( const char *szKeyName, const char *szValue )
else if (FStrEq(szKeyName, "spawnobject") )
{
int object = atoi( szValue );
if ( object > 0 && object < ARRAYSIZE(pSpawnObjects) )
if ( object > 0 && object < (int)ARRAYSIZE(pSpawnObjects) )
m_iszSpawnObject = MAKE_STRING( pSpawnObjects[object] );
}
else if (FStrEq(szKeyName, "propdata") )
{
int pdata = atoi( szValue );
if ( pdata > 0 && pdata < ARRAYSIZE(pFGDPropData) )
if ( pdata > 0 && pdata < (int)ARRAYSIZE(pFGDPropData) )
{
m_iszPropData = MAKE_STRING( pFGDPropData[pdata] );
}
@ -467,7 +467,7 @@ void CBreakable::Precache( void )
else
{
// Actually, precache all possible objects...
for ( int i = 0; i < ARRAYSIZE(pSpawnObjects) ; ++i )
for ( int i = 0; i < (int)ARRAYSIZE(pSpawnObjects) ; ++i )
{
if ( !pSpawnObjects[ i ] )
continue;
@ -501,7 +501,7 @@ void CBreakable::DamageSound( void )
{
int pitch;
float fvol;
char *soundname = NULL;
const char *soundname = NULL;
int material = m_Material;
if (random->RandomInt(0,2))
@ -746,11 +746,14 @@ void CBreakable::TraceAttack( const CTakeDamageInfo &info, const Vector &vecDir,
EmitSound( "Breakable.Computer" );
}
break;
break;
case matUnbreakableGlass:
g_pEffects->Ricochet( ptr->endpos, (vecDir*-1.0f) );
break;
break;
default:
break;
}
}
@ -1047,7 +1050,7 @@ void CBreakable::Die( void )
CCollisionProperty *pCollisionProp = CollisionProp();
Vector vSize = pCollisionProp->OBBSize();
int iCount = ( vSize[0] * vSize[1] + vSize[1] * vSize[2] + vSize[2] * vSize[0] ) / ( 3 * 12 * 12 );
int iCount = (int)(( vSize[0] * vSize[1] + vSize[1] * vSize[2] + vSize[2] * vSize[0] ) / ( 3 * 12 * 12 ));
if ( iCount > func_break_max_pieces.GetInt() )
{
@ -1063,7 +1066,7 @@ void CBreakable::Die( void )
}
else if ( m_PerformanceMode == PM_REDUCED_GIBS )
{
int iNewCount = iCount * func_break_reduction_factor.GetFloat();
int iNewCount = (int)(iCount * func_break_reduction_factor.GetFloat());
iCount = max( iNewCount, 1 );
}
}
@ -1120,7 +1123,7 @@ void CBreakable::Die( void )
if ( Explodable() )
{
ExplosionCreate( vecSpot, pCollisionProp->GetCollisionAngles(), this, GetExplosiveDamage(), GetExplosiveRadius(), true );
ExplosionCreate( vecSpot, pCollisionProp->GetCollisionAngles(), this, (int)GetExplosiveDamage(), (int)GetExplosiveRadius(), true );
}
}