-- Flight --
addHook("PlayerThink", function(player)
	if player.mo and player.mo.skin == "pember"
		if not player.exiting // If the player isn't exiting the level...
			if not (P_PlayerInPain(player) or (player.playerstate == PST_DEAD)) // Then, if the player isn't in pain or dead...
				if ((player.powers[pw_carry] == CR_NONE) and not (player.pflags & PF_SPINNING)) // Then if the player isn't being carried or spinning...
					if (player.cmd.buttons & BT_JUMP) // If the player holds jump...
						if player.mo.waterlogged == 1 and not player.powers[pw_super] // Then if you're waterlogged while not super...
							if (player.mo.eflags & MFE_VERTICALFLIP) // If you're upside down... 
								player.mo.momz = -2*FRACUNIT -- Ascend very slowly in the opposite direction
							else
								player.mo.momz = 2*FRACUNIT -- You'll ascend very slowly
							end
						else
							if (player.mo.eflags & MFE_VERTICALFLIP)
								player.mo.momz = -5*FRACUNIT -- Ascend quickly in the opposite direction
							else
								player.mo.momz = 5*FRACUNIT -- You'll ascend quickly
							end
						end
						S_StartSound(player.mo, sfx_buzz4) -- Bee moment
					end
				end
			end
		end
	end
end)