mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Fixed crash when walking into really tall grass on a connected map
This commit is contained in:
@@ -204,7 +204,8 @@ class Game_Character
|
|||||||
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] : $MapFactory.getNewMap(@x, @y)
|
this_map = (self.map.valid?(@x, @y)) ? [self.map, @x, @y] : $MapFactory.getNewMap(@x, @y)
|
||||||
if this_map[0].deepBush?(this_map[1], this_map[2]) && self.map.deepBush?(xbehind, ybehind)
|
behind_map = (self.map.valid?(xbehind, ybehind)) ? [self.map, xbehind, ybehind] : $MapFactory.getNewMap(xbehind, ybehind)
|
||||||
|
if this_map[0].deepBush?(this_map[1], this_map[2]) && behind_map[0].deepBush?(behind_map[1], behind_map[2])
|
||||||
@bush_depth = Game_Map::TILE_HEIGHT
|
@bush_depth = Game_Map::TILE_HEIGHT
|
||||||
elsif !moving? && this_map[0].bush?(this_map[1], this_map[2])
|
elsif !moving? && this_map[0].bush?(this_map[1], this_map[2])
|
||||||
@bush_depth = 12
|
@bush_depth = 12
|
||||||
|
|||||||
Reference in New Issue
Block a user