1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-12-24 21:55:42 +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:
fgenesis 2011-11-21 00:01:12 +01:00
parent e6e33f2f9d
commit 47c31660ca
3 changed files with 4 additions and 3 deletions

View file

@ -46,6 +46,7 @@ function v.commonInit(me)
entity_setActivationType(me, AT_NONE) entity_setActivationType(me, AT_NONE)
entity_setUpdateCull(me, 1024) entity_setUpdateCull(me, 1024)
entity_alpha(me, 0) entity_alpha(me, 0)
entity_setAllDamageTargets(me, false)
end end
function update(me, dt) function update(me, dt)

View file

@ -114,7 +114,7 @@ function enterState(me)
elseif entity_getState(me)==STATE_ATTACHED then elseif entity_getState(me)==STATE_ATTACHED then
entity_setEntityType(me, ET_NEUTRAL) entity_setEntityType(me, ET_NEUTRAL)
entity_setMaxSpeed(me, 0) entity_setMaxSpeed(me, 0)
avatar_incrLeaches() entity_incrTargetLeaches(me)
entity_sound(me, "Leach") entity_sound(me, "Leach")
v.attachBone = entity_getNearestBoneToPosition(entity_getTarget(me), entity_getPosition(me)) v.attachBone = entity_getNearestBoneToPosition(entity_getTarget(me), entity_getPosition(me))
--[[ --[[
@ -132,7 +132,7 @@ end
function exitState(me) function exitState(me)
if entity_getState(me)==STATE_ATTACHED then if entity_getState(me)==STATE_ATTACHED then
-- entity_setState(STATE_IDLE) -- entity_setState(STATE_IDLE)
avatar_decrLeaches() entity_decrTargetLeaches(me)
elseif entity_isState(me, STATE_FLYOFF) then elseif entity_isState(me, STATE_FLYOFF) then
entity_setState(me, STATE_IDLE) entity_setState(me, STATE_IDLE)
end end

View file

@ -43,7 +43,7 @@ function v.commonInit(me, gfx, flag, cst)
v.back = true v.back = true
end end
v.isCostume = cst v.isCostume = cst or false
end end
function v.commonUpdate(me, dt) function v.commonUpdate(me, dt)