blucalm

Load-Dest-Enemy-Bugfix 14 April 2013

Apr 14th, 2013
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.12 KB | None | 0 0
  1. #-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~
  2. # * Load-Dest-Enemy-Bugfix 14 April 2013
  3. # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
  4. # Author: Eshra
  5. # Compatibility: RPG Maker VX Ace
  6. # Dependencies: raTBS-Alpha
  7. #-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~
  8. # Usage:
  9. #
  10. # Paste this below the other TBS Classes and Modules. This snippet fixes a bug
  11. # which would cause a crash to happen after loading a previously saved game
  12. # and then destroying an enmy in a tactical battle.
  13. #
  14. # Updates:
  15. # 14 April 2013 - Init Release
  16. #-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~
  17.  
  18. class Game_Map
  19.   #----------------------------------------------------------------------------
  20.   # * Reset exy_cache based on event data
  21.   #----------------------------------------------------------------------------
  22.   def reset_exy_cache
  23.     @events.keys.each do |id|
  24.       e = @events[id]
  25.       next if !e
  26.       @exy_cache[[e.x,e.y]].push(id) if !(@exy_cache[[e.x,e.y]]||=[]).include?(id)
  27.     end
  28.   end
  29. end
  30. # EOF
Advertisement
Add Comment
Please, Sign In to add comment