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:
+27
-19
@@ -1,30 +1,32 @@
|
||||
//========= Copyright Valve Corporation, All rights reserved. ============//
|
||||
//===== Copyright © 1996-2005, Valve Corporation, All rights reserved. ======//
|
||||
//
|
||||
// Purpose: Base combat character with no AI
|
||||
// Purpose: Used to deal with AI navigation
|
||||
//
|
||||
// $Workfile: $
|
||||
// $Date: $
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// $Log: $
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================//
|
||||
//===========================================================================//
|
||||
|
||||
#ifndef AI_LINK_H
|
||||
#define AI_LINK_H
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "ai_hull.h" // For num hulls
|
||||
|
||||
struct edict_t;
|
||||
|
||||
enum Link_Info_t
|
||||
{
|
||||
bits_LINK_STALE_SUGGESTED = 0x01, // NPC found this link to be blocked
|
||||
bits_LINK_OFF = 0x02, // This link has been turned off
|
||||
bits_LINK_PRECISE_MOVEMENT = 0x04, // This link requires precise movement near it (for moving through doors for NPCs w/ sloppy movement)
|
||||
bits_PREFER_AVOID = 0x08, // This link has been marked as to prefer not to use it
|
||||
bits_LINK_ASW_BASHABLE = 0x10, // This link is marked as blocked by a door that certain NPCs can break down
|
||||
};
|
||||
|
||||
// for most purposes a bashable door link is considered impassable (only special case NPCs can break them down and they
|
||||
// need custom behaviors)
|
||||
|
||||
//=============================================================================
|
||||
// >> CAI_Link
|
||||
//=============================================================================
|
||||
@@ -36,30 +38,36 @@ class CAI_DynamicLink;
|
||||
class CAI_Link
|
||||
{
|
||||
public:
|
||||
|
||||
short m_iSrcID; // the node that 'owns' this link
|
||||
short m_iDestID; // the node on the other end of the link.
|
||||
|
||||
int DestNodeID(int srcID); // Given the source node ID, returns the destination ID
|
||||
inline int DestNodeID( int srcID ); // Given the source node ID, returns the destination ID
|
||||
|
||||
byte m_iAcceptedMoveTypes[NUM_HULLS]; // Capability_T of motions acceptable for each hull type
|
||||
|
||||
byte m_LinkInfo; // other information about this link
|
||||
|
||||
float m_timeStaleExpires;
|
||||
int m_nDangerCount; // How many dangerous things are near this link?
|
||||
|
||||
CAI_DynamicLink *m_pDynamicLink;
|
||||
|
||||
//edict_t *m_pLinkEnt; // the entity that blocks this connection (doors, etc)
|
||||
|
||||
// m_szLinkEntModelname is not necessarily NULL terminated (so we can store it in a more alignment-friendly 4 bytes)
|
||||
//char m_szLinkEntModelname[ 4 ];// the unique name of the brush model that blocks the connection (this is kept for save/restore)
|
||||
|
||||
//float m_flWeight; // length of the link line segment
|
||||
|
||||
private:
|
||||
friend class CAI_Network;
|
||||
CAI_Link(void);
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Given the source node ID, returns the destination ID
|
||||
// Input :
|
||||
// Output :
|
||||
//-----------------------------------------------------------------------------
|
||||
inline int CAI_Link::DestNodeID(int srcID)
|
||||
{
|
||||
// hardware op for ( srcID==m_iSrcID ? m_iDestID : m_iSrcID )
|
||||
return ieqsel( srcID, m_iSrcID, m_iDestID, m_iSrcID );
|
||||
}
|
||||
|
||||
|
||||
#endif // AI_LINK_H
|
||||
|
||||
Reference in New Issue
Block a user