mirror of
https://github.com/celisej567/source-engine.git
synced 2026-01-04 18:09:53 +03:00
amd64: fix multithread, fix vgui, fix physmodels
This commit is contained in:
@@ -731,7 +731,10 @@ CBaseCombatCharacter::CBaseCombatCharacter( void )
|
||||
}
|
||||
|
||||
// not standing on a nav area yet
|
||||
#ifdef MEXT_BOT
|
||||
m_lastNavArea = NULL;
|
||||
#endif
|
||||
|
||||
m_registeredNavTeam = TEAM_INVALID;
|
||||
|
||||
for (int i = 0; i < MAX_WEAPONS; i++)
|
||||
@@ -3481,17 +3484,20 @@ void CBaseCombatCharacter::UpdateLastKnownArea( void )
|
||||
//-----------------------------------------------------------------------------
|
||||
bool CBaseCombatCharacter::IsAreaTraversable( const CNavArea *area ) const
|
||||
{
|
||||
#ifdef NEXT_BOT
|
||||
return area ? !area->IsBlocked( GetTeamNumber() ) : false;
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Leaving the nav mesh
|
||||
//-----------------------------------------------------------------------------
|
||||
void CBaseCombatCharacter::ClearLastKnownArea( void )
|
||||
{
|
||||
#ifdef NEXT_BOT
|
||||
OnNavAreaChanged( NULL, m_lastNavArea );
|
||||
|
||||
|
||||
if ( m_lastNavArea )
|
||||
{
|
||||
m_lastNavArea->DecrementPlayerCount( m_registeredNavTeam, entindex() );
|
||||
@@ -3499,21 +3505,22 @@ void CBaseCombatCharacter::ClearLastKnownArea( void )
|
||||
m_lastNavArea = NULL;
|
||||
m_registeredNavTeam = TEAM_INVALID;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Handling editor removing the area we're standing upon
|
||||
//-----------------------------------------------------------------------------
|
||||
void CBaseCombatCharacter::OnNavAreaRemoved( CNavArea *removedArea )
|
||||
{
|
||||
#ifdef NEXT_BOT
|
||||
if ( m_lastNavArea == removedArea )
|
||||
{
|
||||
ClearLastKnownArea();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Changing team, maintain associated data
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
@@ -400,11 +400,19 @@ public:
|
||||
void SetPreventWeaponPickup( bool bPrevent ) { m_bPreventWeaponPickup = bPrevent; }
|
||||
bool m_bPreventWeaponPickup;
|
||||
|
||||
virtual CNavArea *GetLastKnownArea( void ) const { return m_lastNavArea; } // return the last nav area the player occupied - NULL if unknown
|
||||
virtual bool IsAreaTraversable( const CNavArea *area ) const; // return true if we can use the given area
|
||||
virtual CNavArea *GetLastKnownArea( void ) const
|
||||
{
|
||||
#ifdef NEXT_BOT
|
||||
return m_lastNavArea;
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
} // return the last nav area the player occupied - NULL if unknown
|
||||
|
||||
virtual void ClearLastKnownArea( void );
|
||||
virtual void UpdateLastKnownArea( void ); // invoke this to update our last known nav area (since there is no think method chained to CBaseCombatCharacter)
|
||||
virtual void OnNavAreaChanged( CNavArea *enteredArea, CNavArea *leftArea ) { } // invoked (by UpdateLastKnownArea) when we enter a new nav area (or it is reset to NULL)
|
||||
virtual bool IsAreaTraversable( const CNavArea *area ) const; // return true if we can use the given area
|
||||
virtual void OnNavAreaRemoved( CNavArea *removedArea );
|
||||
|
||||
// -----------------------
|
||||
|
||||
@@ -1968,7 +1968,7 @@ void CNPC_Barnacle::OnTongueTipUpdated()
|
||||
//-----------------------------------------------------------------------------
|
||||
void CNPC_Barnacle::UpdateTongue( void )
|
||||
{
|
||||
if ( m_hTongueTip == NULL )
|
||||
if ( m_hTongueTip == NULL || m_hTongueTip->m_pSpring == NULL )
|
||||
return;
|
||||
|
||||
// Set the spring's length to that of the tongue's extension
|
||||
|
||||
@@ -150,8 +150,8 @@ void PointCameraSetupVisibility( CBaseEntity *pPlayer, int area, unsigned char *
|
||||
pCameraEnt->SetActive( false );
|
||||
}
|
||||
|
||||
int nNext;
|
||||
for ( int i = g_InfoCameraLinkList.Head(); i != g_InfoCameraLinkList.InvalidIndex(); i = nNext )
|
||||
intp nNext;
|
||||
for ( intp i = g_InfoCameraLinkList.Head(); i != g_InfoCameraLinkList.InvalidIndex(); i = nNext )
|
||||
{
|
||||
nNext = g_InfoCameraLinkList.Next( i );
|
||||
|
||||
|
||||
@@ -73,7 +73,6 @@ public:
|
||||
bool operator()( CBaseCombatCharacter *actor )
|
||||
{
|
||||
actor->OnNavAreaRemoved( m_deadArea );
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -200,12 +199,12 @@ public:
|
||||
{
|
||||
#if PLATFORM_64BITS
|
||||
COMPILE_TIME_ASSERT( sizeof(CNavArea *) == 8 );
|
||||
int64 key[2] = { (int64)item.pAreas[0] + (int64)item.pAreas[1]->GetID(), (int64)item.pAreas[1] + (int64)item.pAreas[0]->GetID() };
|
||||
int64 key[2] = { (int64)(item.pAreas[0] + item.pAreas[1]->GetID()), (int64)(item.pAreas[1] + item.pAreas[0]->GetID()) };
|
||||
return Hash16( key );
|
||||
#else
|
||||
COMPILE_TIME_ASSERT( sizeof(CNavArea *) == 4 );
|
||||
int key[2] = { (int)(item.pAreas[0] + item.pAreas[1]->GetID()), (int)(item.pAreas[1] + item.pAreas[0]->GetID()) };
|
||||
return Hash8( key );
|
||||
return Hash8( key );
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
@@ -45,7 +45,9 @@ class CShowZone : public IForEachNavArea
|
||||
public:
|
||||
virtual bool Inspect( const CNavArea *area )
|
||||
{
|
||||
#ifdef NEXT_BOT
|
||||
area->DrawFilled( 255, 255, 0, 255, 9999.9f );
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user