1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-12-24 21:55:42 +00:00

Minor script fixes

- Bigmouth & Grabbyarm will no longer spam "entity invalid pointer"
- Make Huggys follow through local warps (thx to Andrew Church for this)
This commit is contained in:
fgenesis 2012-03-14 01:00:46 +01:00
parent 273b608214
commit 0cdbc66c02
3 changed files with 4 additions and 2 deletions

View file

@ -174,7 +174,7 @@ function hitSurface(me)
end end
function damage(me, attacker, bone, damageType, dmg) 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) bone_damageFlash(bone)
v.paraHits = v.paraHits - dmg v.paraHits = v.paraHits - dmg
if v.paraHits <= 0 then if v.paraHits <= 0 then

View file

@ -123,7 +123,7 @@ function update(me, dt)
v.grabbedEnt = v.n v.grabbedEnt = v.n
entity_setState(me, STATE_TRAP) 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 v.grabbedEnt = v.li
entity_setState(me, STATE_TRAP) entity_setState(me, STATE_TRAP)

View file

@ -206,11 +206,13 @@ function enterState(me)
esetv(me, EV_LOOKAT,1) esetv(me, EV_LOOKAT,1)
entity_animate(me, "idle", LOOP_INF) entity_animate(me, "idle", LOOP_INF)
entity_setMaxSpeed(me, 400) entity_setMaxSpeed(me, 400)
entity_setUpdateCull(me, 1500)
elseif entity_getState(me)==STATE_ATTACHED then elseif entity_getState(me)==STATE_ATTACHED then
entity_setEntityType(me, ET_NEUTRAL) entity_setEntityType(me, ET_NEUTRAL)
esetv(me, EV_LOOKAT,0) esetv(me, EV_LOOKAT,0)
entity_setMaxSpeed(me, 0) entity_setMaxSpeed(me, 0)
entity_setUpdateCull(me, -1)
entity_animate(me, "attached", LOOP_INF) entity_animate(me, "attached", LOOP_INF)
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))