Restore back old navigation system
This commit is contained in:
1 parent
c9c6b7e7fb
commit
ea8f64c940
7 files changed
+44
-275
No files matched your search
+3
-4
@@ -173,8 +173,8 @@ void Character::resetPlayerAfterDeath() {
|
||||
state.attack = 0;
|
||||
}
|
||||
|
||||
bool Character::forceReplan() {
|
||||
if (!pathPlanner) return false;
|
||||
void Character::forceReplan() {
|
||||
if (!pathPlanner) return;
|
||||
|
||||
const Eigen::Vector3f normalizedTarget(state.requestedWalkTarget.x(), 0.f, state.requestedWalkTarget.z());
|
||||
state.pathWaypoints = pathPlanner(state.position, normalizedTarget);
|
||||
@@ -185,13 +185,12 @@ bool Character::forceReplan() {
|
||||
waypoint.y() = 0.f;
|
||||
}
|
||||
state.walkTarget = state.pathWaypoints.back();
|
||||
return true;
|
||||
return;
|
||||
}
|
||||
|
||||
state.walkTarget = Eigen::Vector3f(state.position.x(), 0.f, state.position.z());
|
||||
state.onArrivedCallback = nullptr;
|
||||
state.onArrivedCallbackName.clear();
|
||||
return false;
|
||||
}
|
||||
|
||||
void Character::setTexture(std::shared_ptr<FRG::Texture> texture) {
|
||||
|
||||
Reference in new issue
Block a user