mirror of
https://github.com/SashLilac/cambridge.git
synced 2024-12-22 22:19:03 -06:00
Re-add clamp for backgrounds beyond the limit
This commit is contained in:
parent
6fb583e463
commit
50410958f0
@ -8,7 +8,7 @@ image_formats = {".png", ".jpg"}
|
||||
bgpath = "res/backgrounds/"
|
||||
dir = love.filesystem.getDirectoryItems(bgpath)
|
||||
|
||||
local backgrounds = {}
|
||||
backgrounds = {}
|
||||
|
||||
local function loadExtendedBgs()
|
||||
extended_bgs = require("res.backgrounds.extend_section_bg")
|
||||
|
@ -980,7 +980,7 @@ end
|
||||
|
||||
function GameMode:drawBackground()
|
||||
local id = self:getBackground()
|
||||
-- if type(id) == "number" then id = clamp(id, 0, #backgrounds) end
|
||||
if type(id) == "number" then id = clamp(id, 0, #backgrounds) end
|
||||
love.graphics.setColor(1, 1, 1, 1)
|
||||
drawBackground(id)
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user