mirror of
https://github.com/nillerusr/source-engine.git
synced 2026-09-01 15:09:19 +00:00
upload "kind" alien swarm
This commit is contained in:
+31
-10
@@ -1,4 +1,4 @@
|
||||
//========= Copyright Valve Corporation, All rights reserved. ============//
|
||||
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose: Hint node utilities and functions.
|
||||
//
|
||||
@@ -28,6 +28,7 @@
|
||||
#define bits_HINT_NOT_CLOSE_TO_ENEMY 0x00000800 // Hint must not be within 30 feet of my enemy
|
||||
#define bits_HINT_HAS_LOS_TO_PLAYER 0x00001000 // Like VISIBLE_TO_PLAYER but doesn't care about player's facing
|
||||
#define bits_HAS_EYEPOSITION_LOS_TO_PLAYER 0x00002000 // Like HAS LOS TO PLAYER, but checks NPC's eye position at the node, not node origin.
|
||||
#define bits_HINT_HAS_NO_EYEPOSITION_LOS_TO_ENEMY 0x00004000 // Like an inverted HAS LOS TO PLAYER, but checks NPC's eye position at the node, not node origin.
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
@@ -59,13 +60,16 @@ enum Hint_e
|
||||
HINT_WORLD_INHIBIT_COMBINE_MINES,
|
||||
HINT_WORLD_VISUALLY_INTERESTING_STEALTH,
|
||||
|
||||
HINT_GENERIC,
|
||||
|
||||
HINT_TACTICAL_COVER_MED = 100,
|
||||
HINT_TACTICAL_COVER_LOW,
|
||||
HINT_TACTICAL_SPAWN,
|
||||
HINT_NOT_USED_TACTICAL_SPAWN,
|
||||
HINT_TACTICAL_PINCH, // Exit / entrance to an arena
|
||||
HINT_NOT_USED_TACTICAL_GUARD,
|
||||
HINT_TACTICAL_ENEMY_DISADVANTAGED, //Disadvantageous position for the enemy
|
||||
HINT_NOT_USED_HEALTH_KIT,
|
||||
HINT_TACTICAL_HIGH_GROUND,
|
||||
|
||||
HINT_NOT_USED_URBAN_STREETCORNER = 200,
|
||||
HINT_NOT_USED_URBAN_STREETLAMP,
|
||||
@@ -104,14 +108,16 @@ enum Hint_e
|
||||
HINT_PLAYER_ALLY_MOVE_AWAY_DEST = 950,
|
||||
HINT_PLAYER_ALLY_FEAR_DEST,
|
||||
|
||||
// HL1 port hints
|
||||
HINT_HL1_WORLD_MACHINERY = 1000,
|
||||
HINT_HL1_WORLD_BLINKING_LIGHT,
|
||||
HINT_HL1_WORLD_HUMAN_BLOOD,
|
||||
HINT_HL1_WORLD_ALIEN_BLOOD,
|
||||
|
||||
// CS port hints
|
||||
HINT_CSTRIKE_HOSTAGE_ESCAPE = 1100,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef INFESTED_DLL
|
||||
HINT_ASW_COVERED_SPAWN = 1300,
|
||||
#endif
|
||||
};
|
||||
const char *GetHintTypeDescription( Hint_e iHintType );
|
||||
const char *GetHintTypeDescription( CAI_Hint *pHint );
|
||||
@@ -120,6 +126,8 @@ const char *GetHintTypeDescription( CAI_Hint *pHint );
|
||||
// CHintCriteria
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
typedef bool (*HintSearchFilterFunc_t)( void *pContext, CAI_Hint *pCandidate );
|
||||
|
||||
class CHintCriteria
|
||||
{
|
||||
public:
|
||||
@@ -134,9 +142,15 @@ public:
|
||||
void SetGroup( string_t group );
|
||||
string_t GetGroup( void ) const { return m_strGroup; }
|
||||
|
||||
void SetFilterFunc( HintSearchFilterFunc_t pfnFilter, void *pContext = NULL ) { m_pfnFilter = pfnFilter; m_pFilterContext = pContext; }
|
||||
bool PassesFilter( CAI_Hint *pCandidate ) const { return ( m_pfnFilter ) ? (*m_pfnFilter)( m_pFilterContext, pCandidate ) : true; }
|
||||
|
||||
void SetGenericType( string_t genericType ) { m_strGenericType = genericType; }
|
||||
string_t GetGenericType( void ) const { return m_strGenericType; }
|
||||
|
||||
int GetFirstHintType( void ) const { return m_iFirstHintType; }
|
||||
int GetLastHintType( void ) const { return m_iLastHintType; }
|
||||
bool MatchesHintType( int hintType ) const;
|
||||
bool MatchesHintType( int hintType, string_t iszGenericType = NULL_STRING ) const;
|
||||
bool MatchesSingleHintType() const;
|
||||
|
||||
bool HasIncludeZones( void ) const { return ( m_zoneInclude.Count() != 0 ); }
|
||||
@@ -173,9 +187,13 @@ private:
|
||||
int m_iFirstHintType;
|
||||
int m_iLastHintType;
|
||||
string_t m_strGroup;
|
||||
string_t m_strGenericType;
|
||||
|
||||
zoneList_t m_zoneInclude;
|
||||
zoneList_t m_zoneExclude;
|
||||
|
||||
HintSearchFilterFunc_t m_pfnFilter;
|
||||
void * m_pFilterContext;
|
||||
};
|
||||
|
||||
class CAI_Node;
|
||||
@@ -201,7 +219,6 @@ public:
|
||||
CAIHintVector &operator=( const CAIHintVector &src )
|
||||
{
|
||||
CopyArray( src.Base(), src.Count() );
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -299,9 +316,13 @@ public:
|
||||
NPC_STATE GetMinState() const { return m_NodeData.minState; }
|
||||
NPC_STATE GetMaxState() const { return m_NodeData.maxState; }
|
||||
|
||||
string_t GetGenericType() const { return m_NodeData.iszGenericType; }
|
||||
|
||||
int GetNodeId() { return m_NodeData.nNodeID; }
|
||||
int GetWCId() { return m_NodeData.nWCNodeID; }
|
||||
|
||||
int GetRadius() { return m_NodeData.nRadius; }
|
||||
|
||||
bool HintMatchesCriteria( CAI_BaseNPC *pNPC, const CHintCriteria &hintCriteria, const Vector &position, float *flNearestDistance, bool bIgnoreLock = false, bool bIgnoreHintType = false );
|
||||
bool IsInNodeFOV( CBaseEntity *pOther );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user