1
0
Fork 0

Fix 11a8b71: Set direction and rotation of ships upon building

pull/13625/head
SamuXarick 2025-02-19 18:09:57 +00:00
parent b28dca2222
commit a640398915
1 changed files with 5 additions and 0 deletions

View File

@ -912,7 +912,12 @@ CommandCost CmdBuildShip(DoCommandFlags flags, TileIndex tile, const Engine *e,
v->y_pos = y;
v->z_pos = GetSlopePixelZ(x, y);
v->direction = DiagDirToDir(GetShipDepotDirection(tile));
/* UpdateDeltaXY() requires rotation to be initialised as well. */
v->rotation = v->direction;
v->UpdateDeltaXY();
v->vehstatus = VS_HIDDEN | VS_STOPPED | VS_DEFPAL;
v->spritenum = svi->image_index;