mirror of
https://github.com/nillerusr/source-engine.git
synced 2026-08-08 01:39:36 +00:00
add source-sdk-2013
This commit is contained in:
@@ -636,17 +636,10 @@ void CBaseEntity::SetPredictionRandomSeed( const CUserCmd *cmd )
|
||||
if ( !cmd )
|
||||
{
|
||||
m_nPredictionRandomSeed = -1;
|
||||
#ifdef GAME_DLL
|
||||
m_nPredictionRandomSeedServer = -1;
|
||||
#endif
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
m_nPredictionRandomSeed = ( cmd->random_seed );
|
||||
#ifdef GAME_DLL
|
||||
m_nPredictionRandomSeedServer = ( cmd->server_random_seed );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -655,15 +648,15 @@ void CBaseEntity::SetPredictionRandomSeed( const CUserCmd *cmd )
|
||||
//------------------------------------------------------------------------------
|
||||
void CBaseEntity::DecalTrace( trace_t *pTrace, char const *decalName )
|
||||
{
|
||||
int indexD = decalsystem->GetDecalIndexForName( decalName );
|
||||
if ( indexD < 0 )
|
||||
int index = decalsystem->GetDecalIndexForName( decalName );
|
||||
if ( index < 0 )
|
||||
return;
|
||||
|
||||
Assert( pTrace->m_pEnt );
|
||||
|
||||
CBroadcastRecipientFilter filter;
|
||||
te->Decal( filter, 0.0, &pTrace->endpos, &pTrace->startpos,
|
||||
pTrace->GetEntityIndex(), pTrace->hitbox, indexD );
|
||||
pTrace->GetEntityIndex(), pTrace->hitbox, index );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -1399,9 +1392,9 @@ bool CBaseEntity::IsBSPModel() const
|
||||
if ( GetSolid() == SOLID_BSP )
|
||||
return true;
|
||||
|
||||
const model_t *pModel = modelinfo->GetModel( GetModelIndex() );
|
||||
const model_t *model = modelinfo->GetModel( GetModelIndex() );
|
||||
|
||||
if ( GetSolid() == SOLID_VPHYSICS && modelinfo->GetModelType( pModel ) == mod_brush )
|
||||
if ( GetSolid() == SOLID_VPHYSICS && modelinfo->GetModelType( model ) == mod_brush )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
@@ -1686,7 +1679,7 @@ void CBaseEntity::FireBullets( const FireBulletsInfo_t &info )
|
||||
int iSeed = 0;
|
||||
if ( IsPlayer() )
|
||||
{
|
||||
iSeed = CBaseEntity::GetPredictionRandomSeed( info.m_bUseServerRandomSeed ) & 255;
|
||||
iSeed = CBaseEntity::GetPredictionRandomSeed() & 255;
|
||||
}
|
||||
|
||||
#if defined( HL2MP ) && defined( GAME_DLL )
|
||||
@@ -2257,15 +2250,6 @@ int CBaseEntity::GetTracerAttachment( void )
|
||||
return iAttachment;
|
||||
}
|
||||
|
||||
float CBaseEntity::HealthFraction() const
|
||||
{
|
||||
if ( GetMaxHealth() == 0 )
|
||||
return 1.0f;
|
||||
|
||||
float flFraction = ( float )GetHealth() / ( float )GetMaxHealth();
|
||||
flFraction = clamp( flFraction, 0.0f, 1.0f );
|
||||
return flFraction;
|
||||
}
|
||||
|
||||
int CBaseEntity::BloodColor()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user