diff --git a/game_scripts/scripts/entities/energybarrier.lua b/game_scripts/scripts/entities/energybarrier.lua index 55d3898..1e98870 100644 --- a/game_scripts/scripts/entities/energybarrier.lua +++ b/game_scripts/scripts/entities/energybarrier.lua @@ -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) diff --git a/game_scripts/scripts/entities/leach.lua b/game_scripts/scripts/entities/leach.lua index 430d141..5b5b9ab 100644 --- a/game_scripts/scripts/entities/leach.lua +++ b/game_scripts/scripts/entities/leach.lua @@ -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 diff --git a/game_scripts/scripts/include/collectibletemplate.lua b/game_scripts/scripts/include/collectibletemplate.lua index 8367f0f..cef1121 100644 --- a/game_scripts/scripts/include/collectibletemplate.lua +++ b/game_scripts/scripts/include/collectibletemplate.lua @@ -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)