mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-01-13 07:17:57 +03:00
Misc. fixes from prior NPC changes
This commit is contained in:
parent
6d48f52d12
commit
276d9ff24f
@ -7308,7 +7308,6 @@ bool CAI_BaseNPC::IsActivityFinished( void )
|
|||||||
#ifdef MAPBASE
|
#ifdef MAPBASE
|
||||||
if (GetFakeSequenceGesture() != -1)
|
if (GetFakeSequenceGesture() != -1)
|
||||||
{
|
{
|
||||||
Msg( "Checking if fake sequence gesture is finished\n" );
|
|
||||||
return IsLayerFinished( GetFakeSequenceGesture() );
|
return IsLayerFinished( GetFakeSequenceGesture() );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -16260,9 +16259,16 @@ bool CAI_BaseNPC::IsCrouchedActivity( Activity activity )
|
|||||||
case ACT_COVER_SMG1_LOW:
|
case ACT_COVER_SMG1_LOW:
|
||||||
case ACT_RELOAD_SMG1_LOW:
|
case ACT_RELOAD_SMG1_LOW:
|
||||||
#ifdef MAPBASE
|
#ifdef MAPBASE
|
||||||
//case ACT_RELOAD_AR2_LOW:
|
#if AR2_ACTIVITY_FIX == 1
|
||||||
|
case ACT_COVER_AR2_LOW:
|
||||||
|
case ACT_RELOAD_AR2_LOW:
|
||||||
|
#endif
|
||||||
case ACT_RELOAD_PISTOL_LOW:
|
case ACT_RELOAD_PISTOL_LOW:
|
||||||
case ACT_RELOAD_SHOTGUN_LOW:
|
case ACT_RELOAD_SHOTGUN_LOW:
|
||||||
|
#ifdef EXPANDED_HL2_WEAPON_ACTIVITIES
|
||||||
|
case ACT_RELOAD_REVOLVER_LOW:
|
||||||
|
case ACT_RELOAD_CROSSBOW_LOW:
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -3374,14 +3374,17 @@ void CAI_BaseNPC::RunTask( const Task_t *pTask )
|
|||||||
}
|
}
|
||||||
else if (IsActivityFinished())
|
else if (IsActivityFinished())
|
||||||
{
|
{
|
||||||
// Dismount complete. Fix up our position if we have to
|
// Dismount complete.
|
||||||
|
GetMotor()->MoveClimbStop();
|
||||||
|
|
||||||
|
// Fix up our position if we have to
|
||||||
Vector vecTeleportOrigin;
|
Vector vecTeleportOrigin;
|
||||||
if (GetMotor()->MoveClimbShouldTeleportToSequenceEnd( vecTeleportOrigin ))
|
if (GetMotor()->MoveClimbShouldTeleportToSequenceEnd( vecTeleportOrigin ))
|
||||||
{
|
{
|
||||||
GetMotor()->MoveClimbStop();
|
|
||||||
SetLocalOrigin( vecTeleportOrigin );
|
SetLocalOrigin( vecTeleportOrigin );
|
||||||
TaskComplete();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TaskComplete();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#else
|
#else
|
||||||
|
@ -157,7 +157,7 @@ public:
|
|||||||
virtual float NodeDistanceSqr( CAI_Node &node )
|
virtual float NodeDistanceSqr( CAI_Node &node )
|
||||||
{
|
{
|
||||||
// Heavier hints are considered closer
|
// Heavier hints are considered closer
|
||||||
if (node.GetHint() && node.GetHint()->GetHintWeight() != 1.0f)
|
if ( node.GetHint() && node.GetHint()->GetHintWeight() != 1.0f && (node.GetHint()->GetGroup() == NULL_STRING || node.GetHint()->GetGroup() == m_pNPC->GetHintGroup()) )
|
||||||
{
|
{
|
||||||
return CNodeFilter::NodeDistanceSqr( node ) * node.GetHint()->GetHintWeightInverse();
|
return CNodeFilter::NodeDistanceSqr( node ) * node.GetHint()->GetHintWeightInverse();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user