mirror of
https://github.com/godotengine/godot.git
synced 2024-11-27 09:16:35 +08:00
Fix AStar set/is_point_disabled crash
This commit is contained in:
parent
9d3342545d
commit
cc94a95fc9
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user