mirror of
https://github.com/godotengine/godot.git
synced 2024-11-23 12:43:43 +00:00
Fix typo when setting NavigationRegion travel_cost
(cherry picked from commit 8c324132d0
)
This commit is contained in:
parent
b2ba3bab52
commit
61e28c28cd
@ -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 New Issue
Block a user