Fix syntax errors.
This commit is contained in:
parent
b2dbd9ec60
commit
49284d44a8
@ -659,12 +659,13 @@ end
|
|||||||
-- must be a free function
|
-- must be a free function
|
||||||
-- to use as a foreach target
|
-- to use as a foreach target
|
||||||
function level_tug_crate(t)
|
function level_tug_crate(t)
|
||||||
|
local self=level
|
||||||
local mx0,my0,dmx,dmy=unpack(t)
|
local mx0,my0,dmx,dmy=unpack(t)
|
||||||
local mxy0=_mix{mx0,my0}
|
local mxy0=_mix{mx0,my0}
|
||||||
local existing=self._crates[mxy0]
|
local existing=self._crates[mxy0]
|
||||||
if (not existing) return
|
if (not existing) return
|
||||||
|
|
||||||
level._crates[mxy0]=nil
|
self._crates[mxy0]=nil
|
||||||
local mx1,my1=mx0+dmx,my0+dmy
|
local mx1,my1=mx0+dmx,my0+dmy
|
||||||
local px1,py1=mx1*8,my1*8
|
local px1,py1=mx1*8,my1*8
|
||||||
existing.todo={
|
existing.todo={
|
||||||
@ -675,7 +676,7 @@ function level_tug_crate(t)
|
|||||||
{px=px1,py=py1}
|
{px=px1,py=py1}
|
||||||
}
|
}
|
||||||
|
|
||||||
level._crates[_mix{mx1,my1}]=existing
|
self._crates[_mix{mx1,my1}]=existing
|
||||||
end
|
end
|
||||||
|
|
||||||
-->8
|
-->8
|
||||||
@ -1669,7 +1670,7 @@ function rope:_calc_push(
|
|||||||
local dmy=1 -- maybe push down?
|
local dmy=1 -- maybe push down?
|
||||||
if anch.ady==-1 and a0.y>an.y+6 then
|
if anch.ady==-1 and a0.y>an.y+6 then
|
||||||
-- push up
|
-- push up
|
||||||
ay0,dmy=ay0-1,dmy=-1
|
ay0,dmy=ay0-1,-1
|
||||||
elseif anch.ady!=1 or a0.y>=an.y-6 then
|
elseif anch.ady!=1 or a0.y>=an.y-6 then
|
||||||
return {}
|
return {}
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user