Slightly more efficient fix to level_tug_crate.

This commit is contained in:
Kistaro Windrider 2023-01-02 16:26:30 -08:00
parent 49284d44a8
commit a177660344
Signed by: kistaro
SSH Key Fingerprint: SHA256:TBE2ynfmJqsAf0CP6gsflA0q5X5wD5fVKWPsZ7eVUg8

View File

@ -659,8 +659,7 @@ 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 self,mx0,my0,dmx,dmy=level,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