Fixes TileMap undo not restoring tiles
This commit is contained in:
parent
9ebb3e3107
commit
13e7f1a143
|
@ -2839,7 +2839,7 @@ void TileMap::_set_tile_data(int p_layer, const Vector<int> &p_data) {
|
||||||
const int *r = p_data.ptr();
|
const int *r = p_data.ptr();
|
||||||
|
|
||||||
int offset = (format >= FORMAT_2) ? 3 : 2;
|
int offset = (format >= FORMAT_2) ? 3 : 2;
|
||||||
ERR_FAIL_COND_MSG(c % offset != 0, "Corrupted tile data.");
|
ERR_FAIL_COND_MSG(c % offset != 0, vformat("Corrupted tile data. Got size: %s. Expected modulo: %s", offset));
|
||||||
|
|
||||||
clear_layer(p_layer);
|
clear_layer(p_layer);
|
||||||
|
|
||||||
|
|
|
@ -179,7 +179,7 @@ private:
|
||||||
FORMAT_2,
|
FORMAT_2,
|
||||||
FORMAT_3
|
FORMAT_3
|
||||||
};
|
};
|
||||||
mutable DataFormat format = FORMAT_1; // Assume lowest possible format if none is present;
|
mutable DataFormat format = FORMAT_3;
|
||||||
|
|
||||||
static constexpr float FP_ADJUST = 0.00001;
|
static constexpr float FP_ADJUST = 0.00001;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue