Skip to content

Commit

Permalink
fix: 🐛 stunned cannot die?
Browse files Browse the repository at this point in the history
  • Loading branch information
panxuc committed May 11, 2024
1 parent c42012f commit 006f9f0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions logic/GameClass/GameObj/Ship.cs
Original file line number Diff line number Diff line change
Expand Up @@ -334,19 +334,19 @@ public long SetShipState(RunningStateType running, ShipStateType value = ShipSta
switch (nowShipState)
{
case ShipStateType.Attacking:
if (value == ShipStateType.Null || value == ShipStateType.Stunned || value == ShipStateType.Swinging)
if (value == ShipStateType.Null || value == ShipStateType.Deceased || value == ShipStateType.Stunned || value == ShipStateType.Swinging)
return ChangeShipState(running, value, gameObj);
else return -1;
case ShipStateType.Stunned:
if (value == ShipStateType.Null)
if (value == ShipStateType.Null || value == ShipStateType.Deceased)
return ChangeShipState(running, value, gameObj);
else return -1;
case ShipStateType.Swinging:
if (value == ShipStateType.Null || value == ShipStateType.Stunned)
if (value == ShipStateType.Null || value == ShipStateType.Deceased || value == ShipStateType.Stunned)
return ChangeShipState(running, value, gameObj);
else return -1;
case ShipStateType.Deceased:
if (value == ShipStateType.Null)
if (value == ShipStateType.Null || value == ShipStateType.Deceased)
return ChangeShipState(running, value, gameObj);
else return -1;
default:
Expand Down

0 comments on commit 006f9f0

Please sign in to comment.