Optimised checking of map connections

This commit is contained in:
Maruno17
2021-02-26 23:59:52 +00:00
parent 5963f0fd07
commit 8895d6b1a9
2 changed files with 105 additions and 95 deletions

View File

@@ -334,7 +334,7 @@ class MapScreenScene
conns=MapFactoryHelper.getMapConnections
@mapconns=[]
for c in conns
@mapconns.push(c.clone)
@mapconns.push(c.clone) if !@mapconns.any? { |conn| conn[0] == c[0] && conn[3] == c[3] }
end
if $game_map
@currentmap=$game_map.map_id