|
@@ -48,7 +48,7 @@ int AStar::get_available_point_id() const {
|
|
|
|
|
|
void AStar::add_point(int p_id, const Vector3 &p_pos, real_t p_weight_scale) {
|
|
|
ERR_FAIL_COND_MSG(p_id < 0, vformat("Can't add a point with negative id: %d.", p_id));
|
|
|
- ERR_FAIL_COND_MSG(p_weight_scale < 1, vformat("Can't add a point with weight scale less than one: %f.", p_weight_scale));
|
|
|
+ ERR_FAIL_COND_MSG(p_weight_scale < 0, vformat("Can't add a point with weight scale less than 0.0: %f.", p_weight_scale));
|
|
|
|
|
|
Point *found_pt;
|
|
|
bool p_exists = points.lookup(p_id, found_pt);
|
|
@@ -97,7 +97,7 @@ void AStar::set_point_weight_scale(int p_id, real_t p_weight_scale) {
|
|
|
Point *p;
|
|
|
bool p_exists = points.lookup(p_id, p);
|
|
|
ERR_FAIL_COND_MSG(!p_exists, vformat("Can't set point's weight scale. Point with id: %d doesn't exist.", p_id));
|
|
|
- ERR_FAIL_COND_MSG(p_weight_scale < 1, vformat("Can't set point's weight scale less than one: %f.", p_weight_scale));
|
|
|
+ ERR_FAIL_COND_MSG(p_weight_scale < 0, vformat("Can't set point's weight scale less than 0.0: %f.", p_weight_scale));
|
|
|
|
|
|
p->weight_scale = p_weight_scale;
|
|
|
}
|