diff --git a/game_scripts/scripts/entities/bigmouth.lua b/game_scripts/scripts/entities/bigmouth.lua index 97f45ac..beb276e 100644 --- a/game_scripts/scripts/entities/bigmouth.lua +++ b/game_scripts/scripts/entities/bigmouth.lua @@ -174,7 +174,7 @@ function hitSurface(me) end function damage(me, attacker, bone, damageType, dmg) - if v.parasite and bone_isName(bone,"Parasite") then + if v.parasite and bone ~= 0 and bone_isName(bone,"Parasite") then bone_damageFlash(bone) v.paraHits = v.paraHits - dmg if v.paraHits <= 0 then diff --git a/game_scripts/scripts/entities/grabbyarm.lua b/game_scripts/scripts/entities/grabbyarm.lua index bc486f2..792002d 100644 --- a/game_scripts/scripts/entities/grabbyarm.lua +++ b/game_scripts/scripts/entities/grabbyarm.lua @@ -123,7 +123,7 @@ function update(me, dt) v.grabbedEnt = v.n entity_setState(me, STATE_TRAP) - elseif entity_isEntityInRange(me, v.li, grabRange) then + elseif v.li ~= 0 and entity_isEntityInRange(me, v.li, grabRange) then v.grabbedEnt = v.li entity_setState(me, STATE_TRAP) diff --git a/game_scripts/scripts/entities/huggy.lua b/game_scripts/scripts/entities/huggy.lua index e896afa..bf87dc6 100644 --- a/game_scripts/scripts/entities/huggy.lua +++ b/game_scripts/scripts/entities/huggy.lua @@ -206,11 +206,13 @@ function enterState(me) esetv(me, EV_LOOKAT,1) entity_animate(me, "idle", LOOP_INF) entity_setMaxSpeed(me, 400) + entity_setUpdateCull(me, 1500) elseif entity_getState(me)==STATE_ATTACHED then entity_setEntityType(me, ET_NEUTRAL) esetv(me, EV_LOOKAT,0) entity_setMaxSpeed(me, 0) + entity_setUpdateCull(me, -1) entity_animate(me, "attached", LOOP_INF) entity_sound(me, "Leach") v.attachBone = entity_getNearestBoneToPosition(entity_getTarget(me), entity_getPosition(me))