Save some tokens in horrible, horrible ways. #13

Merged
pyrex merged 6 commits from kistaro/chameleonic:golf into main 2022-12-24 00:08:10 +00:00
Showing only changes of commit 9d93f30426 - Show all commits

View File

@ -502,11 +502,7 @@ function level:get_latch(dx,dy,px,py)
local dx1,dy1=-sgn0(dx),-sgn0(dy) local dx1,dy1=-sgn0(dx),-sgn0(dy)
if crate then if crate then
if crate.def & ( if crate.def & dy1*dy1*(2.5+1.5*dy1)+dx1*dx1*(5-3*dx1) ~= 0 then
dy1 >>> 15 |
(dy1 & 0x1) << 2 |
(dx1 & 0x8000) >>> 12 |
(dx1 & 0x1) << 1) ~= 0 then
return { return {
el="crate", el="crate",
dx=dx1,dy=dy1, dx=dx1,dy=dy1,