Skip to content

Commit

Permalink
more fixes for squadron creation
Browse files Browse the repository at this point in the history
  • Loading branch information
SJuliez committed Aug 2, 2024
1 parent b9c72a7 commit 55b3d63
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
9 changes: 2 additions & 7 deletions megamek/src/megamek/common/Entity.java
Original file line number Diff line number Diff line change
Expand Up @@ -14228,13 +14228,8 @@ public double getAlternateCost() {
*/
public boolean isTrapped() {
if (getTransportId() != Entity.NONE) {
Entity transport = game.getEntity(getTransportId());
if (transport == null) {
transport = game.getOutOfGameEntity(getTransportId());
}
if (transport.isDestroyed()) {
return true;
}
Entity transport = game.getEntityFromAllSources(getTransportId());
return (transport != null) && transport.isDestroyed();
}
return false;
}
Expand Down
4 changes: 3 additions & 1 deletion megamek/src/megamek/server/GameManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -29132,7 +29132,9 @@ private void receiveSquadronAdd(Packet c, int connIndex) {
entityUpdate(fighter.getId());
}
}
// If this is the lounge, we want to configure bombs
fs.updateSkills();
fs.updateWeaponGroups();
fs.updateSensors();
fs.autoSetMaxBombPoints();
if (!getGame().getPhase().isLounge()) {
fs.applyBombs();
Expand Down

0 comments on commit 55b3d63

Please sign in to comment.