From c6857560fe67fa42089114d4fa44e5776f12428b Mon Sep 17 00:00:00 2001 From: sleet01 Date: Thu, 14 Sep 2023 16:51:02 -0700 Subject: [PATCH] [POC] further work on fixes for #417 and #661 --- megamek/src/megamek/server/GameManager.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/megamek/src/megamek/server/GameManager.java b/megamek/src/megamek/server/GameManager.java index 03f08309c73..70decd44763 100644 --- a/megamek/src/megamek/server/GameManager.java +++ b/megamek/src/megamek/server/GameManager.java @@ -27122,9 +27122,6 @@ public Vector 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); @@ -27133,6 +27130,11 @@ public Vector 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 iter = entity.getPickedUpMechWarriors().elements(); while (iter.hasMoreElements()) {