Codechange: Shuffle members of Vehicle to reduce size.

This reduces space wasted due to member alignment.
This commit is contained in:
Peter Nelson
2024-03-14 20:40:33 +00:00
committed by Peter Nelson
parent 3fc7b3b9a0
commit 322ca6ef54
4 changed files with 16 additions and 18 deletions

View File

@@ -22,8 +22,8 @@ typedef std::deque<Trackdir> ShipPathCache;
* All ships have this type.
*/
struct Ship final : public SpecializedVehicle<Ship, VEH_SHIP> {
TrackBits state; ///< The "track" the ship is following.
ShipPathCache path; ///< Cached path.
TrackBits state; ///< The "track" the ship is following.
Direction rotation; ///< Visible direction.
int16_t rotation_x_pos; ///< NOSAVE: X Position before rotation.
int16_t rotation_y_pos; ///< NOSAVE: Y Position before rotation.