- [FIX] Al cambiar d'habitacions durante el joc se creaba algun item extra
This commit is contained in:
@@ -17,17 +17,18 @@ sprites = {
|
||||
end,
|
||||
|
||||
remove_out_of_room = function()
|
||||
print("Current room: "..rooms.current())
|
||||
for i,v in ipairs(sprites.list) do
|
||||
if v.room ~= rooms.current() then
|
||||
table.remove(sprites.list, i)
|
||||
local room = v.room or 0
|
||||
print("Sprite at room "..room.." removed: "..v.type)
|
||||
end
|
||||
end
|
||||
--print("Current room: "..rooms.current())
|
||||
--for i,v in ipairs(sprites.list) do
|
||||
-- if v.room ~= rooms.current() then
|
||||
-- table.remove(sprites.list, i)
|
||||
-- local room = v.room or 0
|
||||
-- print("Sprite at room "..room.." removed: "..v.type)
|
||||
-- end
|
||||
--end
|
||||
end,
|
||||
|
||||
add_from_room = function(rx,ry)
|
||||
sprites.list = {}
|
||||
map.surf(rooms.surf_items)
|
||||
for y = ry, ry+11 do
|
||||
for x = rx, rx+19 do
|
||||
|
||||
Reference in New Issue
Block a user