mirror of
https://github.com/godotengine/godot.git
synced 2024-11-22 12:12:28 +00:00
Fix typo when setting NavigationRegion travel_cost
This commit is contained in:
parent
21f6916ffc
commit
8c324132d0
@ -422,7 +422,7 @@ real_t NavigationRegion2D::get_enter_cost() const {
|
||||
void NavigationRegion2D::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);
|
||||
NavigationServer2D::get_singleton()->region_set_enter_cost(region, travel_cost);
|
||||
NavigationServer2D::get_singleton()->region_set_travel_cost(region, travel_cost);
|
||||
}
|
||||
|
||||
real_t NavigationRegion2D::get_travel_cost() const {
|
||||
|
@ -119,7 +119,7 @@ real_t NavigationRegion3D::get_enter_cost() const {
|
||||
void NavigationRegion3D::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);
|
||||
NavigationServer3D::get_singleton()->region_set_enter_cost(region, travel_cost);
|
||||
NavigationServer3D::get_singleton()->region_set_travel_cost(region, travel_cost);
|
||||
}
|
||||
|
||||
real_t NavigationRegion3D::get_travel_cost() const {
|
||||
|
Loading…
Reference in New Issue
Block a user