aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGosha <284210+Lordron@users.noreply.github.com>2023-10-16 03:23:01 +0300
committerShauren <shauren.trinity@gmail.com>2023-12-11 21:23:55 +0100
commit6ff8ce5bffb69d7c6d961bda26d579fa44e37801 (patch)
tree5f05ab78b934a0a22b5d0a9116135c68cd9bfc42
parent15813c8c51d8c6bbf3b3495902c83894344038be (diff)
Core/Cells: align Cell.data.Part fields by 8 bits and enlarge Cell structure to 8 bytes
8-bits align removes unneded shift operations
-rw-r--r--src/server/game/Grids/Cells/Cell.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/server/game/Grids/Cells/Cell.h b/src/server/game/Grids/Cells/Cell.h
index c5c00d9e366..2e5bd2c2cb9 100644
--- a/src/server/game/Grids/Cells/Cell.h
+++ b/src/server/game/Grids/Cells/Cell.h
@@ -95,14 +95,14 @@ struct Cell
{
struct
{
- unsigned grid_x : 6;
- unsigned grid_y : 6;
- unsigned cell_x : 6;
- unsigned cell_y : 6;
- unsigned nocreate : 1;
- unsigned reserved : 7;
+ unsigned grid_x : 8;
+ unsigned grid_y : 8;
+ unsigned cell_x : 8;
+ unsigned cell_y : 8;
+ unsigned nocreate : 8;
+ unsigned reserved : 24;
} Part;
- uint32 All;
+ uint64 All;
} data;
template<class T, class CONTAINER> void Visit(CellCoord const&, TypeContainerVisitor<T, CONTAINER>& visitor, Map&, WorldObject const& obj, float radius) const;