Skip to content

Commit

Permalink
Do not add small unit crew to passengers of an aerospace carrier
Browse files Browse the repository at this point in the history
  • Loading branch information
SJuliez committed May 26, 2024
1 parent 678ae35 commit d73cf5b
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions megamek/src/megamek/server/GameManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -3687,14 +3687,6 @@ private void loadUnit(Entity loader, Entity unit, int bayNumber) {
// set deployment round of the loadee to equal that of the loader
unit.setDeployRound(loader.getDeployRound());

// Update the loading unit's passenger count, if it's a large craft
if ((loader instanceof SmallCraft) || (loader instanceof Jumpship)) {
// Don't add DropShip crew to a JumpShip or station's passenger list
if (!unit.isLargeCraft()) {
loader.setNPassenger(loader.getNPassenger() + unit.getCrew().getSize());
}
}

// Update the loaded unit.
entityUpdate(unit.getId());
entityUpdate(loader.getId());
Expand Down Expand Up @@ -3958,14 +3950,6 @@ private boolean unloadUnit(Entity unloader, Targetable unloaded,
unit.setDone(false);
}

//Update the transport unit's passenger count, if it's a large craft
if (unloader instanceof SmallCraft || unloader instanceof Jumpship) {
//Don't add dropship crew to a jumpship or station's passenger list
if (!unit.isLargeCraft()) {
unloader.setNPassenger(Math.max(0, unloader.getNPassenger() - unit.getCrew().getSize()));
}
}

// Update the unloaded unit.
entityUpdate(unit.getId());

Expand Down

0 comments on commit d73cf5b

Please sign in to comment.