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:
parent
6962a3e3ab
commit
84a73b59f9
1 changed files with 15 additions and 11 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue