Fixed npc_sniper not acquiring player as target after SP respawn

This commit is contained in:
Blixibon 2022-10-16 13:47:29 -05:00
parent 8cf06b2865
commit 6945ef2468

View File

@ -940,6 +940,14 @@ void CProtoSniper::OnScheduleChange( void )
{
LaserOff();
#ifdef MAPBASE
if ( m_bKilledPlayer && HasCondition( COND_SEE_PLAYER ) )
{
// IMPOSSIBLE! (possible when SP respawn is enabled)
m_bKilledPlayer = false;
}
#endif
BaseClass::OnScheduleChange();
}
@ -3439,6 +3447,18 @@ AI_BEGIN_CUSTOM_NPC( proto_sniper, CProtoSniper )
//=========================================================
//=========================================================
#ifdef MAPBASE
DEFINE_SCHEDULE
(
SCHED_PSNIPER_PLAYER_DEAD,
" Tasks"
" TASK_SNIPER_PLAYER_DEAD 0"
" "
" Interrupts"
" COND_SEE_PLAYER"
)
#else
DEFINE_SCHEDULE
(
SCHED_PSNIPER_PLAYER_DEAD,
@ -3448,6 +3468,7 @@ AI_BEGIN_CUSTOM_NPC( proto_sniper, CProtoSniper )
" "
" Interrupts"
)
#endif
AI_END_CUSTOM_NPC()