mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2024-12-27 07:06:00 +00:00
Fix sound problems in energyboss and warning in predatorytunicate script.
Thx Diablodoct0r for reporting the latter.
This commit is contained in:
parent
a52b26c782
commit
4c8fc05de8
2 changed files with 7 additions and 6 deletions
|
@ -367,7 +367,7 @@ function update(me, dt)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if entity_isState(me, STATE_MOVING) and entity_x(me) >= node_x(v.maxMove) then
|
if entity_isState(me, STATE_MOVING) and entity_x(me) >= node_x(v.maxMove) then
|
||||||
if entity_isInterpolating() then
|
if entity_isInterpolating(me) then
|
||||||
entity_animate(me, "idle")
|
entity_animate(me, "idle")
|
||||||
end
|
end
|
||||||
entity_stopInterpolating(me)
|
entity_stopInterpolating(me)
|
||||||
|
@ -400,7 +400,7 @@ function enterState(me)
|
||||||
entity_stopInterpolating(me)
|
entity_stopInterpolating(me)
|
||||||
entity_animate(me, "idle", LOOP_INF)
|
entity_animate(me, "idle", LOOP_INF)
|
||||||
elseif entity_isState(me, STATE_ATTACK) then
|
elseif entity_isState(me, STATE_ATTACK) then
|
||||||
playSfx("EnergyBoss-Attack", 900+math.random(200))
|
playSfx("EnergyBoss-Attack", (900+math.random(200)) / 1000)
|
||||||
local x, y = bone_getPosition(v.bone_jaw)
|
local x, y = bone_getPosition(v.bone_jaw)
|
||||||
if entity_isPositionInRange(v.naija, x, y, 600)
|
if entity_isPositionInRange(v.naija, x, y, 600)
|
||||||
and entity_y(v.naija) < y+64
|
and entity_y(v.naija) < y+64
|
||||||
|
@ -441,12 +441,12 @@ function enterState(me)
|
||||||
end
|
end
|
||||||
v.attackDelay = 0
|
v.attackDelay = 0
|
||||||
v.fireDelay = 0
|
v.fireDelay = 0
|
||||||
playSfx("EnergyBoss-Hurt", 900+math.random(200))
|
playSfx("EnergyBoss-Hurt", (900+math.random(200)) / 1000)
|
||||||
entity_animate(me, "hurt")
|
entity_animate(me, "hurt")
|
||||||
entity_setPosition(me, entity_x(me)-500, entity_y(me), 1.6)
|
entity_setPosition(me, entity_x(me)-500, entity_y(me), 1.6)
|
||||||
elseif entity_isState(me, STATE_HITBARRIER) then
|
elseif entity_isState(me, STATE_HITBARRIER) then
|
||||||
entity_stopInterpolating(me)
|
entity_stopInterpolating(me)
|
||||||
playSfx("EnergyBoss-Die", 1100+math.random(200))
|
playSfx("EnergyBoss-Die", (1100+math.random(200)) / 1000)
|
||||||
entity_animate(me, "hitBarrier")
|
entity_animate(me, "hitBarrier")
|
||||||
|
|
||||||
entity_spawnParticlesFromCollisionMask(me, "energyboss-hit", 4)
|
entity_spawnParticlesFromCollisionMask(me, "energyboss-hit", 4)
|
||||||
|
@ -459,7 +459,7 @@ function enterState(me)
|
||||||
entity_setPosition(me, node_x(backNode), entity_y(me), -800)
|
entity_setPosition(me, node_x(backNode), entity_y(me), -800)
|
||||||
elseif entity_isState(me, STATE_COLLAPSE) then
|
elseif entity_isState(me, STATE_COLLAPSE) then
|
||||||
clearShots()
|
clearShots()
|
||||||
playSfx("EnergyBoss-Die", 1000)
|
playSfx("EnergyBoss-Die")
|
||||||
setFlag(FLAG_ENERGYBOSSDEAD, 1)
|
setFlag(FLAG_ENERGYBOSSDEAD, 1)
|
||||||
entity_setDamageTarget(me, DT_AVATAR_ENERGYBLAST, false)
|
entity_setDamageTarget(me, DT_AVATAR_ENERGYBLAST, false)
|
||||||
entity_setDamageTarget(me, DT_AVATAR_SHOCK, false)
|
entity_setDamageTarget(me, DT_AVATAR_SHOCK, false)
|
||||||
|
@ -504,7 +504,7 @@ function enterState(me)
|
||||||
--end
|
--end
|
||||||
elseif entity_isState(me, STATE_INTRO) then
|
elseif entity_isState(me, STATE_INTRO) then
|
||||||
v.awoken = true
|
v.awoken = true
|
||||||
playSfx("EnergyBoss-Die", 800)
|
playSfx("EnergyBoss-Die", 0.8)
|
||||||
shakeCamera(10, 3)
|
shakeCamera(10, 3)
|
||||||
entity_stopInterpolating(me)
|
entity_stopInterpolating(me)
|
||||||
entity_animate(me, "roar")
|
entity_animate(me, "roar")
|
||||||
|
|
|
@ -28,6 +28,7 @@ v.getOutHits = 0
|
||||||
v.hx = 0
|
v.hx = 0
|
||||||
v.hy = 0
|
v.hy = 0
|
||||||
v.hurtTimer = 0
|
v.hurtTimer = 0
|
||||||
|
v.trapDelay = 0
|
||||||
|
|
||||||
local STATE_TRAP = 1001
|
local STATE_TRAP = 1001
|
||||||
local STATE_TRAPPED = 1002
|
local STATE_TRAPPED = 1002
|
||||||
|
|
Loading…
Reference in a new issue