Skip to content

Commit

Permalink
[POC] further work on fixes for #417 and #661
Browse files Browse the repository at this point in the history
  • Loading branch information
Sleet01 committed Sep 14, 2023
1 parent 7d84795 commit c685756
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions megamek/src/megamek/server/GameManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -27122,9 +27122,6 @@ public Vector<Report> destroyEntity(Entity entity, String reason, boolean surviv

// Destroy the entity, unless it's already destroyed.
if (!entity.isDoomed() && !entity.isDestroyed()) {
GameUnitDiedEvent gude = new GameUnitDiedEvent(this, game, entity, entity.damageThisRound, reason);
game.processGameEvent(gude);

r = new Report(6365);
r.subject = entity.getId();
r.addDesc(entity);
Expand All @@ -27133,6 +27130,11 @@ public Vector<Report> destroyEntity(Entity entity, String reason, boolean surviv

entity.setDoomed(true);

// Fire GameUnitDiedEvent here?
// @sleet01
GameUnitDiedEvent gude = new GameUnitDiedEvent(this, game, entity, entity.damageThisRound, reason);
game.processGameEvent(gude);

// Kill any picked up MechWarriors
Enumeration<Integer> iter = entity.getPickedUpMechWarriors().elements();
while (iter.hasMoreElements()) {
Expand Down

0 comments on commit c685756

Please sign in to comment.