Przeglądaj źródła

Merge pull request #25509 from bojidar-bg/25504-update-bitmask-crash

Fix crashes when calling update_bitmask_area
Rémi Verschelde 6 lat temu
rodzic
commit
9523403192
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      scene/resources/tile_set.cpp

+ 1 - 1
scene/resources/tile_set.cpp

@@ -614,7 +614,7 @@ Vector2 TileSet::autotile_get_subtile_for_bitmask(int p_id, uint16_t p_bitmask,
 	if (coords.size() == 0) {
 	if (coords.size() == 0) {
 		return autotile_get_icon_coordinate(p_id);
 		return autotile_get_icon_coordinate(p_id);
 	} else {
 	} else {
-		return coords[Math::random(0, (int)coords.size())];
+		return coords[Math::rand() % coords.size()];
 	}
 	}
 }
 }