Skip to content

Commit

Permalink
Fix updating the old transport when switching ships
Browse files Browse the repository at this point in the history
The old transporter needs to be updated when a transported unit switches to
another transport, otherwise its "loaded" status may be wrong on the client
side.

Closes #1883.

(cherry picked from commit 039b957)
  • Loading branch information
lmoureaux committed Jun 17, 2023
1 parent 67a1d90 commit 190e0bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/unithand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ static bool do_unit_board(struct player *act_player, struct unit *act_unit,
const struct action *paction)
{
if (unit_transported(act_unit)) {
unit_transport_unload(act_unit);
unit_transport_unload_send(act_unit);
}

// Load the unit and send out info to clients.
Expand Down Expand Up @@ -673,7 +673,7 @@ static bool do_unit_embark(struct player *act_player, struct unit *act_unit,

if (unit_transported(act_unit)) {
// Assumed to be legal.
unit_transport_unload(act_unit);
unit_transport_unload_send(act_unit);
}

// Do it.
Expand Down

0 comments on commit 190e0bd

Please sign in to comment.