Fix typo when setting NavigationRegion travel_cost
(cherry picked from commit 8c324132d0
)
This commit is contained in:
parent
ee5eb943f7
commit
9d1a972b49
2 changed files with 2 additions and 2 deletions
|
@ -412,7 +412,7 @@ real_t NavigationPolygonInstance::get_enter_cost() const {
|
|||
void NavigationPolygonInstance::set_travel_cost(real_t p_travel_cost) {
|
||||
ERR_FAIL_COND_MSG(p_travel_cost < 0.0, "The travel_cost must be positive.");
|
||||
travel_cost = MAX(p_travel_cost, 0.0);
|
||||
Navigation2DServer::get_singleton()->region_set_enter_cost(region, travel_cost);
|
||||
Navigation2DServer::get_singleton()->region_set_travel_cost(region, travel_cost);
|
||||
}
|
||||
|
||||
real_t NavigationPolygonInstance::get_travel_cost() const {
|
||||
|
|
|
@ -94,7 +94,7 @@ real_t NavigationMeshInstance::get_enter_cost() const {
|
|||
void NavigationMeshInstance::set_travel_cost(real_t p_travel_cost) {
|
||||
ERR_FAIL_COND_MSG(p_travel_cost < 0.0, "The travel_cost must be positive.");
|
||||
travel_cost = MAX(p_travel_cost, 0.0);
|
||||
NavigationServer::get_singleton()->region_set_enter_cost(region, travel_cost);
|
||||
NavigationServer::get_singleton()->region_set_travel_cost(region, travel_cost);
|
||||
}
|
||||
|
||||
real_t NavigationMeshInstance::get_travel_cost() const {
|
||||
|
|
Loading…
Reference in a new issue