Skip to content

Commit

Permalink
fix: 回復時にも被弾音声が流れる問題を修正した
Browse files Browse the repository at this point in the history
回復判定を最初に行うよう修正した
  • Loading branch information
den3606 committed Aug 25, 2022
1 parent ccfc92f commit c0f505c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions files/scripts/player/damage_received.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ local function playDamageSound(player_entity_id, akanechan_voice, damage)
local take_big_damage = BIG_DAMAGE < damage
local is_heal = damage < 0

if is_heal then
-- TODO: 回復用音声を追加する
return
end

if is_on_fire then
if take_big_damage then
SoundPlayer:registerForceSoundEntity(akanechan_voice, "mods/akanechan_voice/files/entities/sounds/damage_received/heavy_damage_voice.xml")
Expand All @@ -30,8 +35,6 @@ local function playDamageSound(player_entity_id, akanechan_voice, damage)
end, 60 * 1)
elseif take_big_damage then
SoundPlayer:registerCoverSoundEntity(akanechan_voice, "mods/akanechan_voice/files/entities/sounds/damage_received/heavy_damage_voice.xml")
elseif is_heal then
-- TODO: 回復用音声を追加する
else
WaitFrame:tryCall(player_entity_id, AKANECHAN:RECEIVED_DAMAGE(), function()
SoundPlayer:registerCoverSoundEntity(akanechan_voice, "mods/akanechan_voice/files/entities/sounds/damage_received/mild_damage_voice.xml")
Expand Down

0 comments on commit c0f505c

Please sign in to comment.