aboutsummaryrefslogtreecommitdiff
path: root/scene/2d/tile_map.h
diff options
context:
space:
mode:
authorJuan Linietsky2014-09-19 18:39:50 -0300
committerJuan Linietsky2014-09-19 18:39:50 -0300
commit549d344f0fef5e5748ded69b6a037698ff55f8bc (patch)
treea22ee2a3b0d6303fe3e4348831e7f581dd8a0a07 /scene/2d/tile_map.h
parent526aae62edfa31aa156d604e8b25caab512c6bff (diff)
downloadgodot-549d344f0fef5e5748ded69b6a037698ff55f8bc.tar.gz
godot-549d344f0fef5e5748ded69b6a037698ff55f8bc.tar.zst
godot-549d344f0fef5e5748ded69b6a037698ff55f8bc.zip
Diffstat (limited to 'scene/2d/tile_map.h')
-rw-r--r--scene/2d/tile_map.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/scene/2d/tile_map.h b/scene/2d/tile_map.h
index 4b4d94892..d21437e30 100644
--- a/scene/2d/tile_map.h
+++ b/scene/2d/tile_map.h
@@ -50,12 +50,13 @@ class TileMap : public Node2D {
int16_t x;
int16_t y;
};
-
uint32_t key;
- bool operator<(const PosKey& pk) const { return key<pk.key; }
+
+ //using a more precise comparison so the regions can be sorted later
+ bool operator<(const PosKey& p_k) const { return (y==p_k.y) ? x < p_k.x : y < p_k.y; }
PosKey(int16_t p_x, int16_t p_y) { x=p_x; y=p_y; }
- PosKey() { key=0; }
+ PosKey() { x=0; y=0; }
};
@@ -97,6 +98,7 @@ class TileMap : public Node2D {
Rect2 rect_cache;
bool rect_cache_dirty;
+ bool quadrant_order_dirty;
float fp_adjust;
float friction;
float bounce;