| 1781 | } |
| 1782 | |
| 1783 | bool CBot::CheckItems() |
| 1784 | { |
| 1785 | if (!m_pCurrentGoalWaypoint && !CheckJump() && CheckStuck()) |
| 1786 | { |
| 1787 | // Don't check for ents a while when stuck |
| 1788 | m_iCheckEntsDelay = lastmillis + RandomLong(1000, 2000); |
| 1789 | return false; |
| 1790 | } |
| 1791 | |
| 1792 | if (m_vGoal==g_vecZero) |
| 1793 | m_pTargetEnt = NULL; |
| 1794 | |
| 1795 | if (!m_pTargetEnt) |
| 1796 | { |
| 1797 | if (m_iCheckEntsDelay > lastmillis) |
| 1798 | return false; |
| 1799 | else |
| 1800 | { |
| 1801 | m_pTargetEnt = SearchForEnts(!m_classicsp); |
| 1802 | m_iCheckEntsDelay = lastmillis + RandomLong(2500, 5000); |
| 1803 | } |
| 1804 | } |
| 1805 | |
| 1806 | if (m_pTargetEnt) |
| 1807 | { |
| 1808 | if (HeadToTargetEnt()) |
| 1809 | return true; |
| 1810 | } |
| 1811 | |
| 1812 | if (m_eCurrentBotState == STATE_ENT) |
| 1813 | { |
| 1814 | ResetWaypointVars(); |
| 1815 | m_vGoal = g_vecZero; |
| 1816 | m_pTargetEnt = NULL; |
| 1817 | } |
| 1818 | |
| 1819 | return false; |
| 1820 | } |
| 1821 | |
| 1822 | bool CBot::InUnreachableList(entity *e) |
| 1823 | { |
nothing calls this directly
no test coverage detected