Fix AStar set/is_point_disabled crash

This commit is contained in:
Chaosus 2019-06-18 07:53:41 +03:00
parent 9d3342545d
commit cc94a95fc9

View file

@ -435,10 +435,16 @@ PoolVector<int> AStar::get_id_path(int p_from_id, int p_to_id) {
}
void AStar::set_point_disabled(int p_id, bool p_disabled) {
ERR_FAIL_COND(!points.has(p_id));
points[p_id]->enabled = !p_disabled;
}
bool AStar::is_point_disabled(int p_id) const {
ERR_FAIL_COND_V(!points.has(p_id), false);
return !points[p_id]->enabled;
}