1
0
Fork 0

Fix 11a8b71: Set direction and rotation of ships upon building (#13625)

pull/13646/head
SamuXarick 2025-02-22 23:33:25 +00:00 committed by GitHub
parent b28dca2222
commit 718a45b845
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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;