fix: make bots reach the debug goal node.
This commit is contained in:
parent
4552ebd79c
commit
5d2a81f341
2 changed files with 5 additions and 11 deletions
|
|
@ -3054,18 +3054,9 @@ void Bot::normal_ () {
|
||||||
// user forced a waypoint as a goal?
|
// user forced a waypoint as a goal?
|
||||||
if (debugGoal != kInvalidNodeIndex && getTask ()->data != debugGoal) {
|
if (debugGoal != kInvalidNodeIndex && getTask ()->data != debugGoal) {
|
||||||
clearSearchNodes ();
|
clearSearchNodes ();
|
||||||
|
|
||||||
getTask ()->data = debugGoal;
|
getTask ()->data = debugGoal;
|
||||||
}
|
m_chosenGoalIndex = debugGoal;
|
||||||
|
|
||||||
// stand still if reached debug goal
|
|
||||||
else if (m_currentNodeIndex == debugGoal) {
|
|
||||||
pev->button = 0;
|
|
||||||
ignoreCollision ();
|
|
||||||
|
|
||||||
m_moveSpeed = 0.0;
|
|
||||||
m_strafeSpeed = 0.0f;
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// bots rushing with knife, when have no enemy (thanks for idea to nicebot project)
|
// bots rushing with knife, when have no enemy (thanks for idea to nicebot project)
|
||||||
|
|
|
||||||
|
|
@ -823,6 +823,9 @@ bool Bot::updateNavigation () {
|
||||||
else if (m_currentTravelFlags & PathFlag::Jump) {
|
else if (m_currentTravelFlags & PathFlag::Jump) {
|
||||||
desiredDistance = 0.0f;
|
desiredDistance = 0.0f;
|
||||||
}
|
}
|
||||||
|
else if (m_path->number == cv_debug_goal.int_ ()) {
|
||||||
|
desiredDistance = 0.0f;
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
desiredDistance = m_path->radius;
|
desiredDistance = m_path->radius;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue