From 37ba9766c3f24fd8b03cf23176d42aa73cc5a510 Mon Sep 17 00:00:00 2001 From: Xuc Pan Date: Tue, 21 May 2024 22:32:01 +0800 Subject: [PATCH 1/2] fix: :bug: wormhole keep killing --- logic/Gaming/AttackManager.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/logic/Gaming/AttackManager.cs b/logic/Gaming/AttackManager.cs index 7e74fae5..d220a500 100755 --- a/logic/Gaming/AttackManager.cs +++ b/logic/Gaming/AttackManager.cs @@ -106,8 +106,9 @@ private void BombObj(Bullet bullet, GameObj objBeingShot) } break; case GameObjType.Wormhole: + var previousHP = ((WormholeCell)objBeingShot).Wormhole.HP; ((WormholeCell)objBeingShot).Wormhole.BeAttacked(bullet); - if (((WormholeCell)objBeingShot).Wormhole.HP < GameData.WormholeHP / 2) + if (previousHP >= GameData.WormholeHP / 2 && ((WormholeCell)objBeingShot).Wormhole.HP < GameData.WormholeHP / 2) { var shipList = gameMap.ShipInTheList(((WormholeCell)objBeingShot).Wormhole.Cells); if (shipList != null) From 7823460b56d3107c89ffb3591949849c63a8f52b Mon Sep 17 00:00:00 2001 From: Xuc Pan Date: Tue, 21 May 2024 23:01:48 +0800 Subject: [PATCH 2/2] fix: :bug: construction not zero --- logic/GameClass/GameObj/Areas/Construction.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/logic/GameClass/GameObj/Areas/Construction.cs b/logic/GameClass/GameObj/Areas/Construction.cs index 8b82dfd6..217764df 100755 --- a/logic/GameClass/GameObj/Areas/Construction.cs +++ b/logic/GameClass/GameObj/Areas/Construction.cs @@ -70,8 +70,6 @@ public bool BeAttacked(Bullet bullet) } if (HP == 0) { - lock (lockOfConstructionType) - constructionType = ConstructionType.Null; IsActivated.Set(false); } return HP.IsBelowMaxTimes(0.5);