aboutsummaryrefslogtreecommitdiff
path: root/mp/src/game/client/c_baseentity.cpp
diff options
context:
space:
mode:
authorJohn Schoenick <[email protected]>2015-09-09 18:35:41 -0700
committerJohn Schoenick <[email protected]>2015-09-09 18:35:41 -0700
commit0d8dceea4310fde5706b3ce1c70609d72a38efdf (patch)
treec831ef32c2c801a5c5a80401736b52c7b5a528ec /mp/src/game/client/c_baseentity.cpp
parentUpdated the SDK with the latest code from the TF and HL2 branches. (diff)
downloadsource-sdk-2013-0d8dceea4310fde5706b3ce1c70609d72a38efdf.tar.xz
source-sdk-2013-0d8dceea4310fde5706b3ce1c70609d72a38efdf.zip
Updated the SDK with the latest code from the TF and HL2 branches.HEADmaster
Diffstat (limited to 'mp/src/game/client/c_baseentity.cpp')
-rw-r--r--mp/src/game/client/c_baseentity.cpp64
1 files changed, 36 insertions, 28 deletions
diff --git a/mp/src/game/client/c_baseentity.cpp b/mp/src/game/client/c_baseentity.cpp
index 25b089cd..338f986c 100644
--- a/mp/src/game/client/c_baseentity.cpp
+++ b/mp/src/game/client/c_baseentity.cpp
@@ -1150,6 +1150,13 @@ bool C_BaseEntity::InitializeAsClientEntityByIndex( int iIndex, RenderGroup_t re
return true;
}
+void C_BaseEntity::TrackAngRotation( bool bTrack )
+{
+ if ( bTrack )
+ AddVar( &m_angRotation, &m_iv_angRotation, LATCH_SIMULATION_VAR );
+ else
+ RemoveVar( &m_angRotation, false );
+}
void C_BaseEntity::Term()
{
@@ -2459,37 +2466,36 @@ void C_BaseEntity::UnlinkFromHierarchy()
void C_BaseEntity::ValidateModelIndex( void )
{
#ifdef TF_CLIENT_DLL
- if ( m_nModelIndexOverrides[VISION_MODE_NONE] > 0 )
+ if ( IsLocalPlayerUsingVisionFilterFlags( TF_VISION_FILTER_HALLOWEEN ) )
{
- if ( IsLocalPlayerUsingVisionFilterFlags( TF_VISION_FILTER_HALLOWEEN ) )
+ if ( m_nModelIndexOverrides[VISION_MODE_HALLOWEEN] > 0 )
{
- if ( m_nModelIndexOverrides[VISION_MODE_HALLOWEEN] > 0 )
- {
- SetModelByIndex( m_nModelIndexOverrides[VISION_MODE_HALLOWEEN] );
- return;
- }
+ SetModelByIndex( m_nModelIndexOverrides[VISION_MODE_HALLOWEEN] );
+ return;
}
+ }
- if ( IsLocalPlayerUsingVisionFilterFlags( TF_VISION_FILTER_PYRO ) )
+ if ( IsLocalPlayerUsingVisionFilterFlags( TF_VISION_FILTER_PYRO ) )
+ {
+ if ( m_nModelIndexOverrides[VISION_MODE_PYRO] > 0 )
{
- if ( m_nModelIndexOverrides[VISION_MODE_PYRO] > 0 )
- {
- SetModelByIndex( m_nModelIndexOverrides[VISION_MODE_PYRO] );
- return;
- }
+ SetModelByIndex( m_nModelIndexOverrides[VISION_MODE_PYRO] );
+ return;
}
+ }
- if ( IsLocalPlayerUsingVisionFilterFlags( TF_VISION_FILTER_ROME ) )
+ if ( IsLocalPlayerUsingVisionFilterFlags( TF_VISION_FILTER_ROME ) )
+ {
+ if ( m_nModelIndexOverrides[VISION_MODE_ROME] > 0 )
{
- if ( m_nModelIndexOverrides[VISION_MODE_ROME] > 0 )
- {
- SetModelByIndex( m_nModelIndexOverrides[VISION_MODE_ROME] );
- return;
- }
+ SetModelByIndex( m_nModelIndexOverrides[VISION_MODE_ROME] );
+ return;
}
+ }
+ if ( m_nModelIndexOverrides[VISION_MODE_NONE] > 0 )
+ {
SetModelByIndex( m_nModelIndexOverrides[VISION_MODE_NONE] );
-
return;
}
#endif
@@ -2621,14 +2627,6 @@ void C_BaseEntity::PostDataUpdate( DataUpdateType_t updateType )
//-----------------------------------------------------------------------------
void C_BaseEntity::OnDataUnchangedInPVS()
{
- Interp_RestoreToLastNetworked( GetVarMapping() );
-
- // For non-predicted and non-client only ents, we need to latch network values into the interpolation histories
- if ( !GetPredictable() && !IsClientCreated() )
- {
- OnLatchInterpolatedVariables( LATCH_SIMULATION_VAR );
- }
-
Assert( m_hNetworkMoveParent.Get() || !m_hNetworkMoveParent.IsValid() );
HierarchySetParent(m_hNetworkMoveParent);
@@ -6308,6 +6306,9 @@ bool C_BaseEntity::ValidateEntityAttachedToPlayer( bool &bShouldRetry )
if ( FStrEq( pszModel, "models/flag/briefcase.mdl" ) )
return true;
+ if ( FStrEq( pszModel, "models/passtime/ball/passtime_ball.mdl" ) )
+ return true;
+
if ( FStrEq( pszModel, "models/props_doomsday/australium_container.mdl" ) )
return true;
@@ -6323,6 +6324,13 @@ bool C_BaseEntity::ValidateEntityAttachedToPlayer( bool &bShouldRetry )
if ( FStrEq( pszModel, "models/props_moonbase/powersupply_flag.mdl" ) )
return true;
+
+ // The Halloween 2014 doomsday flag replacement
+ if ( FStrEq( pszModel, "models/flag/ticket_case.mdl" ) )
+ return true;
+
+ if ( FStrEq( pszModel, "models/weapons/c_models/c_grapple_proj/c_grapple_proj.mdl" ) )
+ return true;
}
// Any entity that's not an item parented to a player is invalid.