mirror of
https://github.com/godotengine/godot.git
synced 2026-01-01 05:49:28 +03:00
Fix crashes when calling update_bitmask_area
Fixes #25504
(cherry picked from commit abfeba8d12)
This commit is contained in:
committed by
Rémi Verschelde
parent
633ac4f753
commit
aca8176341
@@ -525,7 +525,7 @@ Vector2 TileSet::autotile_get_subtile_for_bitmask(int p_id, uint16_t p_bitmask,
|
||||
if (coords.size() == 0) {
|
||||
return autotile_get_icon_coordinate(p_id);
|
||||
} else {
|
||||
return coords[Math::random(0, (int)coords.size())];
|
||||
return coords[Math::rand() % coords.size()];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user