mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2024-12-23 21:26:14 +00:00
minor script fixes
- restored leach.lua 1.1.1 compatibility (entity_*TargetLeaches still works) - fixed possible script warning when picking up a collectible - made energy bariers ignore damage
This commit is contained in:
parent
e6e33f2f9d
commit
47c31660ca
3 changed files with 4 additions and 3 deletions
|
@ -46,6 +46,7 @@ function v.commonInit(me)
|
|||
entity_setActivationType(me, AT_NONE)
|
||||
entity_setUpdateCull(me, 1024)
|
||||
entity_alpha(me, 0)
|
||||
entity_setAllDamageTargets(me, false)
|
||||
end
|
||||
|
||||
function update(me, dt)
|
||||
|
|
|
@ -114,7 +114,7 @@ function enterState(me)
|
|||
elseif entity_getState(me)==STATE_ATTACHED then
|
||||
entity_setEntityType(me, ET_NEUTRAL)
|
||||
entity_setMaxSpeed(me, 0)
|
||||
avatar_incrLeaches()
|
||||
entity_incrTargetLeaches(me)
|
||||
entity_sound(me, "Leach")
|
||||
v.attachBone = entity_getNearestBoneToPosition(entity_getTarget(me), entity_getPosition(me))
|
||||
--[[
|
||||
|
@ -132,7 +132,7 @@ end
|
|||
function exitState(me)
|
||||
if entity_getState(me)==STATE_ATTACHED then
|
||||
-- entity_setState(STATE_IDLE)
|
||||
avatar_decrLeaches()
|
||||
entity_decrTargetLeaches(me)
|
||||
elseif entity_isState(me, STATE_FLYOFF) then
|
||||
entity_setState(me, STATE_IDLE)
|
||||
end
|
||||
|
|
|
@ -43,7 +43,7 @@ function v.commonInit(me, gfx, flag, cst)
|
|||
v.back = true
|
||||
end
|
||||
|
||||
v.isCostume = cst
|
||||
v.isCostume = cst or false
|
||||
end
|
||||
|
||||
function v.commonUpdate(me, dt)
|
||||
|
|
Loading…
Reference in a new issue