upload "kind" alien swarm

This commit is contained in:
nillerusr
2023-10-03 17:23:56 +03:00
parent b7bd94c52e
commit 7d3c0d8b5a
4229 changed files with 462900 additions and 495155 deletions
+4 -55
View File
@@ -1,4 +1,4 @@
//========= Copyright Valve Corporation, All rights reserved. ============//
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
@@ -20,8 +20,6 @@ enum { MAX_NAV_TEAMS = 2 };
class CFuncElevator;
class CFuncNavPrerequisite;
class CFuncNavCost;
class CNavVectorNoEditAllocator
{
@@ -304,7 +302,6 @@ public:
void MarkAsBlocked( int teamID, CBaseEntity *blocker, bool bGenerateEvent = true ); // An entity can force a nav area to be blocked
virtual void UpdateBlocked( bool force = false, int teamID = TEAM_ANY ); // Updates the (un)blocked status of the nav area (throttled)
virtual bool IsBlocked( int teamID, bool ignoreNavBlockers = false ) const;
void UnblockArea( int teamID = TEAM_ANY ); // clear blocked status for the given team(s)
void CheckFloor( CBaseEntity *ignore ); // Checks if there is a floor under the nav area, in case a breakable floor is gone
@@ -313,19 +310,6 @@ public:
bool HasAvoidanceObstacle( float maxObstructionHeight = StepHeight ) const; // is there a large, immobile object obstructing this area
float GetAvoidanceObstacleHeight( void ) const; // returns the maximum height of the obstruction above the ground
#ifdef NEXT_BOT
bool HasPrerequisite( CBaseCombatCharacter *actor = NULL ) const; // return true if this area has a prerequisite that applies to the given actor
const CUtlVector< CHandle< CFuncNavPrerequisite > > &GetPrerequisiteVector( void ) const; // return vector of prerequisites that must be met before this area can be traversed
void RemoveAllPrerequisites( void );
void AddPrerequisite( CFuncNavPrerequisite *prereq );
#endif
void ClearAllNavCostEntities( void ); // clear set of func_nav_cost entities that affect this area
void AddFuncNavCostEntity( CFuncNavCost *cost ); // add the given func_nav_cost entity to the cost of this area
float ComputeFuncNavCost( CBaseCombatCharacter *who ) const; // return the cost multiplier of this area's func_nav_cost entities for the given actor
bool HasFuncNavAvoid( void ) const;
bool HasFuncNavPrefer( void ) const;
void CheckWaterLevel( void );
bool IsUnderwater( void ) const { return m_isUnderwater; }
@@ -363,7 +347,6 @@ public:
int GetAdjacentCount( NavDirType dir ) const { return m_connect[ dir ].Count(); } // return number of connected areas in given direction
CNavArea *GetAdjacentArea( NavDirType dir, int i ) const; // return the i'th adjacent area in the given direction
CNavArea *GetRandomAdjacentArea( NavDirType dir ) const;
void CollectAdjacentAreas( CUtlVector< CNavArea * > *adjVector ) const; // build a vector of all adjacent areas
const NavConnectVector *GetAdjacentAreas( NavDirType dir ) const { return &m_connect[dir]; }
bool IsConnected( const CNavArea *area, NavDirType dir ) const; // return true if given area is connected in given direction
@@ -639,10 +622,12 @@ public:
}
protected:
void UnblockArea( void );
private:
friend class CNavMesh;
friend class CNavLadder;
friend class CCSNavArea; // allow CS load code to complete replace our default load behavior
static bool m_isReset; // if true, don't bother cleaning up in destructor since everything is going away
@@ -724,10 +709,6 @@ private:
void CalcDebugID();
#ifdef NEXT_BOT
CUtlVector< CHandle< CFuncNavPrerequisite > > m_prerequisiteVector; // list of prerequisites that must be met before this area can be traversed
#endif
CNavArea *m_prevHash, *m_nextHash; // for hash table in CNavMesh
void ConnectElevators( void ); // find elevator connections between areas
@@ -754,8 +735,6 @@ private:
uint32 m_nVisTestCounter;
static uint32 s_nCurrVisTestCounter;
CUtlVector< CHandle< CFuncNavCost > > m_funcNavCostVector; // active, overlapping cost entities
};
typedef CUtlVector< CNavArea * > NavAreaVector;
@@ -768,36 +747,6 @@ extern NavAreaVector TheNavAreas;
// Inlines
//
#ifdef NEXT_BOT
//--------------------------------------------------------------------------------------------------------------
inline bool CNavArea::HasPrerequisite( CBaseCombatCharacter *actor ) const
{
return m_prerequisiteVector.Count() > 0;
}
//--------------------------------------------------------------------------------------------------------------
inline const CUtlVector< CHandle< CFuncNavPrerequisite > > &CNavArea::GetPrerequisiteVector( void ) const
{
return m_prerequisiteVector;
}
//--------------------------------------------------------------------------------------------------------------
inline void CNavArea::RemoveAllPrerequisites( void )
{
m_prerequisiteVector.RemoveAll();
}
//--------------------------------------------------------------------------------------------------------------
inline void CNavArea::AddPrerequisite( CFuncNavPrerequisite *prereq )
{
if ( m_prerequisiteVector.Find( prereq ) == m_prerequisiteVector.InvalidIndex() )
{
m_prerequisiteVector.AddToTail( prereq );
}
}
#endif
//--------------------------------------------------------------------------------------------------------------
inline float CNavArea::GetDangerDecayRate( void ) const
{