MyTetra Share
Делитесь знаниями!
Star Passability Bug Fix
Время создания: 07.12.2016 19:57
Автор: NeonBlack
Текстовые метки: rgss fix
Раздел: Ruby - RGSS3
Запись: deadelf79/mytetra/raw/master/data/base/1481129871uajnhu1jto/text.html на github.com

#==============================================================================
# VX Ace Star Passability Bug Fix
#   by NeonBlack
# -- Уровень: Простой, Нормальный
# -- Требования: нет
# -- This simply checks if the tile is a star before checking passability.  If the tile is 
# a star and it is passable, it then checks the tile UNDER it.  If not, it returns false 
# as always. This prevents everything that is a star tile from being passable.
#
# -- Original Topic:
# [url]http://forums.rpgmakerweb.com/index....abilities-bug/[/url]
#==============================================================================

class Game_Map

  def check_passage(x, y, bit)
        all_tiles(x, y).each do |tile_id|
          flag = tileset.flags[tile_id]
          if flag & 0x10 != 0                              # [☆]: Не влияет на проход
                next             if flag & bit == 0      # [○] : Проходимый, но звезда
                return false if flag & bit == bit   # [×] : Непроходимый
          else
                return true  if flag & bit == 0  # [○] : Проходимый
                return false if flag & bit == bit   # [×] : Непроходимый
          end
        end
        return false                                              # Непроходимый
  end
end  

 
MyTetra Share v.0.59
Яндекс индекс цитирования