mirror of
https://github.com/Qsgs-Fans/FreeKill.git
synced 2024-11-15 19:22:25 +08:00
prevent enter dying loop
This commit is contained in:
parent
2f9f13f74b
commit
f434e9ee9b
|
@ -1388,12 +1388,14 @@ function Room:changeHp(player, num, reason, skillName, damageStruct)
|
|||
self.logic:trigger(fk.HpChanged, player, data)
|
||||
|
||||
if player.hp < 1 then
|
||||
---@type DyingStruct
|
||||
local dyingStruct = {
|
||||
who = player.id,
|
||||
damage = damageStruct,
|
||||
}
|
||||
self:enterDying(dyingStruct)
|
||||
if num < 0 then
|
||||
---@type DyingStruct
|
||||
local dyingStruct = {
|
||||
who = player.id,
|
||||
damage = damageStruct,
|
||||
}
|
||||
self:enterDying(dyingStruct)
|
||||
end
|
||||
elseif player.dying then
|
||||
player.dying = false
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user