mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-06-05 02:12:10 +03:00
Added a way to override climb node lineup linkage via target node keyvalue
This commit is contained in:
parent
8bf258eb75
commit
184be1a794
@ -289,6 +289,11 @@ public:
|
|||||||
void SetHintType( int hintType, bool force = false );
|
void SetHintType( int hintType, bool force = false );
|
||||||
string_t HintActivityName( void ) const { return m_NodeData.iszActivityName; }
|
string_t HintActivityName( void ) const { return m_NodeData.iszActivityName; }
|
||||||
int GetTargetNode( void ) const { return m_nTargetNodeID; }
|
int GetTargetNode( void ) const { return m_nTargetNodeID; }
|
||||||
|
#ifdef MAPBASE
|
||||||
|
// HACKHACK: This is for when target nodes need to be accessed before being sorted into engine IDs
|
||||||
|
int GetTargetWCNodeID( void ) const { return m_NodeData.nTargetWCNodeID; }
|
||||||
|
int GetWCNodeID( void ) const { return m_NodeData.nWCNodeID; }
|
||||||
|
#endif
|
||||||
bool IsDisabled( void ) const { return (m_NodeData.iDisabled != 0); }
|
bool IsDisabled( void ) const { return (m_NodeData.iDisabled != 0); }
|
||||||
void SetDisabled( bool bDisabled ) { m_NodeData.iDisabled = bDisabled; }
|
void SetDisabled( bool bDisabled ) { m_NodeData.iDisabled = bDisabled; }
|
||||||
void DisableForSeconds( float flSeconds );
|
void DisableForSeconds( float flSeconds );
|
||||||
@ -319,7 +324,9 @@ public:
|
|||||||
const char* ScriptGetHintActivity() { return STRING( HintActivityName() ); }
|
const char* ScriptGetHintActivity() { return STRING( HintActivityName() ); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef MAPBASE
|
||||||
private:
|
private:
|
||||||
|
#endif
|
||||||
void Spawn( void );
|
void Spawn( void );
|
||||||
virtual void Activate();
|
virtual void Activate();
|
||||||
virtual void UpdateOnRemove( void );
|
virtual void UpdateOnRemove( void );
|
||||||
|
@ -227,7 +227,11 @@ int CNodeEnt::Spawn( const char *pMapData )
|
|||||||
// ---------------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------------
|
||||||
CAI_Hint *pHint = NULL;
|
CAI_Hint *pHint = NULL;
|
||||||
|
|
||||||
if ( ClassMatches( "info_node_hint" ) || ClassMatches( "info_node_air_hint" ) )
|
if ( ClassMatches( "info_node_hint" ) || ClassMatches( "info_node_air_hint" )
|
||||||
|
#ifdef MAPBASE
|
||||||
|
|| ClassMatches( "info_node_climb" ) // Climb nodes contain hint data in the FGD
|
||||||
|
#endif
|
||||||
|
)
|
||||||
{
|
{
|
||||||
if ( m_NodeData.nHintType || m_NodeData.strGroup != NULL_STRING || m_NodeData.strEntityName != NULL_STRING )
|
if ( m_NodeData.nHintType || m_NodeData.strGroup != NULL_STRING || m_NodeData.strEntityName != NULL_STRING )
|
||||||
{
|
{
|
||||||
|
@ -3059,6 +3059,16 @@ int CAI_NetworkBuilder::ComputeConnection( CAI_Node *pSrcNode, CAI_Node *pDestNo
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
#ifdef MAPBASE
|
||||||
|
// This is kind of a hack since target node IDs are designed to be used *after* the nodegraph is generated.
|
||||||
|
// However, for the purposes of forcing a climb connection outside of regular lineup bounds, it works.
|
||||||
|
if (pSrcNode->GetHint() && pDestNode->GetHint() &&
|
||||||
|
(pSrcNode->GetHint()->GetTargetWCNodeID() == pDestNode->GetHint()->GetWCId() || pDestNode->GetHint()->GetTargetWCNodeID() == pSrcNode->GetHint()->GetWCId()))
|
||||||
|
{
|
||||||
|
DebugConnectMsg( srcId, destId, " Ignoring climbing lineup due to manual target ID linkage\n" );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
#endif
|
||||||
if ( !IsInLineForClimb(srcPos, UTIL_YawToVector( pSrcNode->m_flYaw ), destPos, UTIL_YawToVector( pDestNode->m_flYaw ) ) )
|
if ( !IsInLineForClimb(srcPos, UTIL_YawToVector( pSrcNode->m_flYaw ), destPos, UTIL_YawToVector( pDestNode->m_flYaw ) ) )
|
||||||
{
|
{
|
||||||
Assert( !IsInLineForClimb(destPos, UTIL_YawToVector( pDestNode->m_flYaw ), srcPos, UTIL_YawToVector( pSrcNode->m_flYaw ) ) );
|
Assert( !IsInLineForClimb(destPos, UTIL_YawToVector( pDestNode->m_flYaw ), srcPos, UTIL_YawToVector( pSrcNode->m_flYaw ) ) );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user