local function CheckAndCrumble2(mo, sec)
  for fof in sec.ffloors()
    if not (fof.flags & FF_EXISTS) continue end -- Does it exist?
    if not (fof.flags & FF_BUSTUP) continue end -- Is it bustable?
    
    if mo.z + mo.momz + mo.height < fof.bottomheight continue end -- Are we too low?
    if mo.z + mo.momz > fof.topheight continue end -- Are we too high?

    -- Check for whatever else you may want to    

    EV_CrumbleChain(fof) -- Crumble
  end
end
local function CheckAndCrumble2WallsOnly(mo, sec)
  for fof in sec.ffloors()
    if not (fof.flags & FF_EXISTS) continue end -- Does it exist?
    if not (fof.flags & FF_BUSTUP) continue end -- Is it bustable?
    
    if mo.z + mo.height <= fof.bottomheight continue end -- Are we too low?
    if mo.z >= fof.topheight continue end -- Are we too high?

    -- Check for whatever else you may want to    

    EV_CrumbleChain(fof) -- Crumble
  end
end

addHook("PlayerThink", function(p)
  if not p.mo return end
  if p.mo.skin != "honey" return end
  if p.mo.state != S_PLAY_HONEYBACKFLIP and p.honey.stomptime <= 0 return end
	CheckAndCrumble2(p.mo, p.mo.subsector.sector)
end)

addHook("PlayerThink", function(p)
  if not p.mo return end
  if p.mo.skin != "honey" return end
  if p.mo.state != S_PLAY_HONEYMELEE1 and p.mo.state != S_PLAY_HONEYMELEE2  return end
	CheckAndCrumble2WallsOnly(p.mo, p.mo.subsector.sector)
end)

addHook("MobjLineCollide", function(mo, line)
  if not mo.player return end
  if mo.skin != "honey" return end
  if mo.state != S_PLAY_HONEYMELEE1 and mo.state != S_PLAY_HONEYMELEE2 return end
  for _, sec in ipairs({line.frontsector, line.backsector})
    CheckAndCrumble2WallsOnly(mo, sec)
  end
end, MT_PLAYER)