1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-02-04 10:34:01 +00:00

Hopefully fixed piranha pet script warning (thx `Nax for reporting)

This commit is contained in:
fgenesis 2013-06-19 02:26:12 +02:00
parent 6962a3e3ab
commit 84a73b59f9

View file

@ -132,6 +132,7 @@ function update(me, dt)
if entity_hasTarget(me) then
target = entity_getTarget(me)
if target ~= 0 then
--[[
ox, oy = entity_getOffset(target)
cx = entity_x(target) + ox + entity_velx(target)
@ -141,6 +142,7 @@ function update(me, dt)
cx = cx + entity_velx(target)
cy = cy + entity_vely(target)
dist = 40
end
--debugLog(string.format("distTimer: %f", v.distTimer))
v.distTimer = v.distTimer + dt * 0.5
@ -160,8 +162,10 @@ function update(me, dt)
end
end
if target ~= 0 then
entity_flipToEntity(me, target)
entity_rotateToEntity(me, target)
end
local a = t
x = x + math.sin(a)*dist