diff options
author | Jude Melton-Houghton <jwmhjwmh@gmail.com> | 2022-10-08 10:25:22 -0400 |
---|---|---|
committer | Jude Melton-Houghton <jwmhjwmh@gmail.com> | 2022-12-24 08:24:59 -0500 |
commit | 7701e70dc92262c41d68cf1c9f7fbd0c333e5c52 (patch) | |
tree | 844babd224322b90dc35039dfa75f99a0c9e98d8 /src/map.h | |
parent | 62ee02b8bae50f519bf88c2b7a8b22bb179f6241 (diff) | |
download | minetest-7701e70dc92262c41d68cf1c9f7fbd0c333e5c52.tar.xz |
Make MapEditEvent more complete
SetBlocksNotSent is no longer used.
Diffstat (limited to 'src/map.h')
-rw-r--r-- | src/map.h | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -79,21 +79,21 @@ struct MapEditEvent MapEditEvent() = default; + // Sets the event's position and marks the block as modified. + void setPositionModified(v3s16 pos) + { + p = pos; + modified_blocks.insert(getNodeBlockPos(pos)); + } + VoxelArea getArea() const { switch(type){ case MEET_ADDNODE: - return VoxelArea(p); case MEET_REMOVENODE: - return VoxelArea(p); case MEET_SWAPNODE: - return VoxelArea(p); case MEET_BLOCK_NODE_METADATA_CHANGED: - { - v3s16 np1 = p*MAP_BLOCKSIZE; - v3s16 np2 = np1 + v3s16(1,1,1)*MAP_BLOCKSIZE - v3s16(1,1,1); - return VoxelArea(np1, np2); - } + return VoxelArea(p); case MEET_OTHER: { VoxelArea a; |