mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2026-01-26 08:16:00 +00:00
Fixed SystemStackError when loading a connected map with an event at its edge facing away from that edge
This commit is contained in:
@@ -65,8 +65,8 @@ class PokemonMapFactory
|
|||||||
return getMap(id, false)
|
return getMap(id, false)
|
||||||
end
|
end
|
||||||
|
|
||||||
def getNewMap(playerX, playerY)
|
def getNewMap(playerX, playerY, map_id = nil)
|
||||||
id = $game_map.map_id
|
id = map_id || $game_map.map_id
|
||||||
MapFactoryHelper.eachConnectionForMap(id) do |conn|
|
MapFactoryHelper.eachConnectionForMap(id) do |conn|
|
||||||
mapidB = nil
|
mapidB = nil
|
||||||
newx = 0
|
newx = 0
|
||||||
|
|||||||
@@ -211,8 +211,8 @@ class Game_Character
|
|||||||
end
|
end
|
||||||
xbehind = @x + (@direction == 4 ? 1 : @direction == 6 ? -1 : 0)
|
xbehind = @x + (@direction == 4 ? 1 : @direction == 6 ? -1 : 0)
|
||||||
ybehind = @y + (@direction == 8 ? 1 : @direction == 2 ? -1 : 0)
|
ybehind = @y + (@direction == 8 ? 1 : @direction == 2 ? -1 : 0)
|
||||||
this_map = (self.map.valid?(@x, @y)) ? [self.map, @x, @y] : $map_factory&.getNewMap(@x, @y)
|
this_map = (self.map.valid?(@x, @y)) ? [self.map, @x, @y] : $map_factory&.getNewMap(@x, @y, self.map.map_id)
|
||||||
behind_map = (self.map.valid?(xbehind, ybehind)) ? [self.map, xbehind, ybehind] : $map_factory&.getNewMap(xbehind, ybehind)
|
behind_map = (self.map.valid?(xbehind, ybehind)) ? [self.map, xbehind, ybehind] : $map_factory&.getNewMap(xbehind, ybehind, self.map.map_id)
|
||||||
if this_map && this_map[0].deepBush?(this_map[1], this_map[2]) &&
|
if this_map && this_map[0].deepBush?(this_map[1], this_map[2]) &&
|
||||||
(!behind_map || behind_map[0].deepBush?(behind_map[1], behind_map[2]))
|
(!behind_map || behind_map[0].deepBush?(behind_map[1], behind_map[2]))
|
||||||
@bush_depth = Game_Map::TILE_HEIGHT
|
@bush_depth = Game_Map::TILE_HEIGHT
|
||||||
|
|||||||
Reference in New Issue
Block a user