Fix #7119: When rotating a ship, apply an additional offset to avoid movement glitch.

This commit is contained in:
Peter Nelson
2019-01-31 20:54:15 +00:00
committed by PeterN
parent 0749a291c4
commit 33e3f49161
3 changed files with 28 additions and 0 deletions

View File

@@ -29,6 +29,8 @@ struct Ship FINAL : public SpecializedVehicle<Ship, VEH_SHIP> {
TrackBitsByte state; ///< The "track" the ship is following.
ShipPathCache path; ///< Cached path.
DirectionByte rotation; ///< Visible direction.
int16 rotation_x_pos; ///< NOSAVE: X Position before rotation.
int16 rotation_y_pos; ///< NOSAVE: Y Position before rotation.
/** We don't want GCC to zero our struct! It already is zeroed and has an index! */
Ship() : SpecializedVehicleBase() {}