From d9352b6d34d6e9b0cc7f53698fb0c41073f71509 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Fri, 13 Jan 2023 11:46:26 -0500 Subject: [PATCH] Refresh mine when destroyed. --- src/engine/objects/Mine.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/engine/objects/Mine.java b/src/engine/objects/Mine.java index b54af98b..eef13364 100644 --- a/src/engine/objects/Mine.java +++ b/src/engine/objects/Mine.java @@ -515,6 +515,16 @@ try{ DbManager.MineQueries.CHANGE_OWNER(this, 0); + // Update mesh + + Building mineBuilding = BuildingManager.getBuildingFromCache(this.buildingID); + + if (mineBuilding == null){ + Logger.debug( "Null mine building " + this.getObjectUUID() +". Unable to Load Building with UID " +this.buildingID); + return; + } + WorldGrid.updateObject(mineBuilding); + // remove hirelings Building building = (Building) getObject(Enum.GameObjectType.Building, this.buildingID);