From 6ff8ce5bffb69d7c6d961bda26d579fa44e37801 Mon Sep 17 00:00:00 2001 From: Gosha <284210+Lordron@users.noreply.github.com> Date: Mon, 16 Oct 2023 03:23:01 +0300 Subject: Core/Cells: align Cell.data.Part fields by 8 bits and enlarge Cell structure to 8 bytes 8-bits align removes unneded shift operations --- src/server/game/Grids/Cells/Cell.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src') 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 void Visit(CellCoord const&, TypeContainerVisitor& visitor, Map&, WorldObject const& obj, float radius) const; -- cgit v1.2.3