Fix first tile not being randomized
This commit is contained in:
@@ -657,8 +657,8 @@ bool TileMapLayerEditorTilesPlugin::forward_canvas_gui_input(const Ref<InputEven
|
||||
Vector2 mpos = xform.affine_inverse().xform(mm->get_position());
|
||||
|
||||
if (edited_layer->local_to_map(drag_last_mouse_pos) != edited_layer->local_to_map(mpos)) {
|
||||
pattern_rng.seed(Math::rand());
|
||||
rng_base_state = Math::rand();
|
||||
pattern_rng.randomize();
|
||||
rng_base_state = pattern_rng.get_state();
|
||||
}
|
||||
|
||||
switch (drag_type) {
|
||||
|
||||
@@ -183,7 +183,7 @@ private:
|
||||
RBSet<TileMapCell> tile_set_selection;
|
||||
|
||||
RandomPCG pattern_rng;
|
||||
uint32_t rng_base_state = 0;
|
||||
uint64_t rng_base_state = 0;
|
||||
|
||||
void _update_selection_pattern_from_tilemap_selection();
|
||||
void _update_selection_pattern_from_tileset_tiles_selection();
|
||||
|
||||
Reference in New Issue
Block a user