Browse Source

game: fix compilation problems for clang

pull/77/head
nillerusr 2 years ago
parent
commit
ddafaa790e
  1. 2
      game/client/particlemgr.cpp
  2. 2
      game/server/hl2/npc_playercompanion.cpp
  3. 2
      game/server/portal/portal_player.cpp
  4. 4
      game/shared/hl2/survival_gamerules.cpp
  5. 2
      game/shared/portal/portal_gamerules.cpp

2
game/client/particlemgr.cpp

@ -1014,7 +1014,7 @@ bool CParticleEffectBinding::RecalculateBoundingBox() @@ -1014,7 +1014,7 @@ bool CParticleEffectBinding::RecalculateBoundingBox()
CEffectMaterial* CParticleEffectBinding::GetEffectMaterial( CParticleSubTexture *pSubTexture )
{
// Hash the IMaterial pointer.
unsigned int index = (((intp)pSubTexture->m_pGroup) >> 6) % EFFECT_MATERIAL_HASH_SIZE;
unsigned int index = (((uintp)pSubTexture->m_pGroup) >> 6) % EFFECT_MATERIAL_HASH_SIZE;
for ( CEffectMaterial *pCur=m_EffectMaterialHash[index]; pCur; pCur = pCur->m_pHashedNext )
{
if ( pCur->m_pGroup == pSubTexture->m_pGroup )

2
game/server/hl2/npc_playercompanion.cpp

@ -3538,7 +3538,7 @@ void CNPC_PlayerCompanion::InputClearAllOuputs( inputdata_t &inputdata ) @@ -3538,7 +3538,7 @@ void CNPC_PlayerCompanion::InputClearAllOuputs( inputdata_t &inputdata )
typedescription_t *dataDesc = &dmap->dataDesc[i];
if ( ( dataDesc->fieldType == FIELD_CUSTOM ) && ( dataDesc->flags & FTYPEDESC_OUTPUT ) )
{
CBaseEntityOutput *pOutput = (CBaseEntityOutput *)((int)this + (int)dataDesc->fieldOffset[0]);
CBaseEntityOutput *pOutput = (CBaseEntityOutput *)((intp)this + (intp)dataDesc->fieldOffset[0]);
pOutput->DeleteAllElements();
/*
int nConnections = pOutput->NumberOfElements();

2
game/server/portal/portal_player.cpp

@ -556,7 +556,7 @@ void CPortal_Player::UpdateExpression( void ) @@ -556,7 +556,7 @@ void CPortal_Player::UpdateExpression( void )
return;
}
char const szScene[256];
char szScene[256] = { 0 };
response->GetResponse( szScene, sizeof(szScene) );
// Ignore updates that choose the same scene

4
game/shared/hl2/survival_gamerules.cpp

@ -207,7 +207,7 @@ void CHalfLife2Survival::ParseSurvivalSettings( KeyValues *pSubKey ) @@ -207,7 +207,7 @@ void CHalfLife2Survival::ParseSurvivalSettings( KeyValues *pSubKey )
}
else if ( !stricmp( pTestKey->GetName(), "spawnhealth" ) )
{
m_SurvivalSettings.m_iSpawnHealth = pTestKey->GetInt( NULL, 100 );
m_SurvivalSettings.m_iSpawnHealth = pTestKey->GetInt( 0, 100 );
}
else if ( !stricmp( pTestKey->GetName(), "allowedpickups" ) )
{
@ -270,4 +270,4 @@ void CHalfLife2Survival::CreateStandardEntities( void ) @@ -270,4 +270,4 @@ void CHalfLife2Survival::CreateStandardEntities( void )
#endif
#endif
#endif

2
game/shared/portal/portal_gamerules.cpp

@ -1265,7 +1265,7 @@ CAmmoDef *GetAmmoDef() @@ -1265,7 +1265,7 @@ CAmmoDef *GetAmmoDef()
def.AddAmmoType("Grenade", DMG_BURN, TRACER_NONE, "sk_plr_dmg_grenade", "sk_npc_dmg_grenade", "sk_max_grenade", 0, 0);
def.AddAmmoType("Thumper", DMG_SONIC, TRACER_NONE, 10, 10, 2, 0, 0 );
def.AddAmmoType("Gravity", DMG_CLUB, TRACER_NONE, 0, 0, 8, 0, 0 );
def.AddAmmoType("Battery", DMG_CLUB, TRACER_NONE, NULL, NULL, NULL, 0, 0 );
def.AddAmmoType("Battery", DMG_CLUB, TRACER_NONE, 0, 0, 0, 0, 0 );
def.AddAmmoType("GaussEnergy", DMG_SHOCK, TRACER_NONE, "sk_jeep_gauss_damage", "sk_jeep_gauss_damage", "sk_max_gauss_round", BULLET_IMPULSE(650, 8000), 0 ); // hit like a 10kg weight at 400 in/s
def.AddAmmoType("CombineCannon", DMG_BULLET, TRACER_LINE, "sk_npc_dmg_gunship_to_plr", "sk_npc_dmg_gunship", NULL, 1.5 * 750 * 12, 0 ); // hit like a 1.5kg weight at 750 ft/s
def.AddAmmoType("AirboatGun", DMG_AIRBOAT, TRACER_LINE, "sk_plr_dmg_airboat", "sk_npc_dmg_airboat", NULL, BULLET_IMPULSE(10, 600), 0 );

Loading…
Cancel
Save