Browse Source

Pitdrones shouldn't search for food during combat (#146)

opforfixed
Roman Chistokhodov 4 years ago committed by GitHub
parent
commit
fdbce18498
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 16
      dlls/gearbox/pitdrone.cpp

16
dlls/gearbox/pitdrone.cpp

@ -1003,22 +1003,6 @@ Schedule_t *CPitdrone::GetSchedule(void) @@ -1003,22 +1003,6 @@ Schedule_t *CPitdrone::GetSchedule(void)
return GetScheduleOfType(SCHED_WAKE_ANGRY);
}
if (HasConditions(bits_COND_SMELL_FOOD))
{
CSound *pSound;
pSound = PBestScent();
if (pSound && (!FInViewCone(&pSound->m_vecOrigin) || !FVisible(pSound->m_vecOrigin)))
{
// scent is behind or occluded
return GetScheduleOfType(SCHED_PDRONE_SNIFF_AND_EAT);
}
// food is right out in the open. Just go get it.
return GetScheduleOfType(SCHED_PDRONE_EAT);
}
if( HasConditions( bits_COND_NO_AMMO_LOADED ) && (m_iInitialAmmo >= 0) )
{
return GetScheduleOfType( SCHED_PDRONE_COVER_AND_RELOAD );

Loading…
Cancel
Save