forked from pyrex/chameleonic
Reduce CPU hit of level rebuild
This commit is contained in:
parent
9960aafd71
commit
20a1feb2bb
@ -432,11 +432,13 @@ function level:recollide_reanchor()
|
||||
for my0=0,15 do
|
||||
local mx1,my1=mx0+dx,my0+dy
|
||||
|
||||
-- bypass mcoll for MEGA SPEED
|
||||
local c=self._coll
|
||||
if (
|
||||
self:mcoll{mx0,my0} and not self:get_crate(mx0,my0) and
|
||||
not self:mcoll{mx0,my1} and
|
||||
not self:mcoll{mx1,my0} and
|
||||
not self:mcoll{mx1,my1}
|
||||
c[mx0..","..my0] and not self:get_crate(mx0,my0) and
|
||||
not c[mx0..","..my1] and
|
||||
not c[mx1..","..my0] and
|
||||
not c[mx1..","..my1]
|
||||
) then
|
||||
local key=_mix{"GEOM",mx0,my0,dx,dy}
|
||||
anch_new[key]= {
|
||||
@ -480,10 +482,6 @@ function level:recollide_reanchor()
|
||||
if player.rope then
|
||||
player.rope:experience_anchor_moves(moves)
|
||||
end
|
||||
|
||||
for point in self:anchor_points() do
|
||||
point.moved=nil
|
||||
end
|
||||
end
|
||||
|
||||
function level:win_at(mx,my)
|
||||
|
Loading…
Reference in New Issue
Block a user