mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-08 05:34:58 +00:00
Fixed dynamic shadows not disappearing after a transfer, fixed events not seeing the player at a distance if facing left, fixed crash when starting a battle against two trainers
This commit is contained in:
@@ -67,6 +67,7 @@ class Scene_Map
|
|||||||
pbCancelVehicles($game_temp.player_new_map_id) if cancelVehicles
|
pbCancelVehicles($game_temp.player_new_map_id) if cancelVehicles
|
||||||
autofade($game_temp.player_new_map_id)
|
autofade($game_temp.player_new_map_id)
|
||||||
pbBridgeOff
|
pbBridgeOff
|
||||||
|
@spritesetGlobal.playersprite.clearShadows
|
||||||
if $game_map.map_id!=$game_temp.player_new_map_id
|
if $game_map.map_id!=$game_temp.player_new_map_id
|
||||||
$MapFactory.setup($game_temp.player_new_map_id)
|
$MapFactory.setup($game_temp.player_new_map_id)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -149,6 +149,11 @@ class Sprite_Character < RPG::Sprite
|
|||||||
update
|
update
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def clearShadows
|
||||||
|
@ombrelist.each { |s| s.dispose if s }
|
||||||
|
@ombrelist.clear
|
||||||
|
end
|
||||||
|
|
||||||
alias shadow_update update
|
alias shadow_update update
|
||||||
|
|
||||||
def update
|
def update
|
||||||
|
|||||||
@@ -369,7 +369,7 @@ def pbEventCanReachPlayer?(event, player, distance)
|
|||||||
when 2 # Down
|
when 2 # Down
|
||||||
real_distance = player.y - event.y - 1
|
real_distance = player.y - event.y - 1
|
||||||
when 4 # Left
|
when 4 # Left
|
||||||
real_distance = event.x - player.x + 1
|
real_distance = event.x - player.x - 1
|
||||||
when 6 # Right
|
when 6 # Right
|
||||||
real_distance = player.x - event.x - event.width
|
real_distance = player.x - event.x - event.width
|
||||||
when 8 # Up
|
when 8 # Up
|
||||||
|
|||||||
@@ -368,12 +368,12 @@ def pbTrainerBattleCore(*args)
|
|||||||
foePartyStarts = []
|
foePartyStarts = []
|
||||||
for arg in args
|
for arg in args
|
||||||
raise _INTL("Expected an array of trainer data, got {1}.",arg) if !arg.is_a?(Array)
|
raise _INTL("Expected an array of trainer data, got {1}.",arg) if !arg.is_a?(Array)
|
||||||
if arg.is_a?(NPCTrainer)
|
if arg[0].is_a?(NPCTrainer)
|
||||||
foeTrainers.push(arg)
|
foeTrainers.push(arg[0])
|
||||||
foePartyStarts.push(foeParty.length)
|
foePartyStarts.push(foeParty.length)
|
||||||
arg.party.each { |pkmn| foeParty.push(pkmn) }
|
arg[0].party.each { |pkmn| foeParty.push(pkmn) }
|
||||||
foeEndSpeeches.push(arg.lose_text)
|
foeEndSpeeches.push(arg[0].lose_text)
|
||||||
foeItems.push(arg.items)
|
foeItems.push(arg[0].items)
|
||||||
else
|
else
|
||||||
# [trainer type, trainer name, ID, speech (optional)]
|
# [trainer type, trainer name, ID, speech (optional)]
|
||||||
trainer = pbLoadTrainer(arg[0],arg[1],arg[2])
|
trainer = pbLoadTrainer(arg[0],arg[1],arg[2])
|
||||||
|
|||||||
Reference in New Issue
Block a user