mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Fixed screen positioning bug when jumping over ledges near the top or left of a map
This commit is contained in:
@@ -544,18 +544,6 @@ end
|
||||
#===============================================================================
|
||||
# Player/event movement in the field
|
||||
#===============================================================================
|
||||
def pbLedge(_xOffset, _yOffset)
|
||||
if $game_player.pbFacingTerrainTag.ledge
|
||||
if pbJumpToward(2, true)
|
||||
$scene.spriteset.addUserAnimation(Settings::DUST_ANIMATION_ID, $game_player.x, $game_player.y, true, 1)
|
||||
$game_player.increase_steps
|
||||
$game_player.check_event_trigger_here([1, 2])
|
||||
end
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
def pbSlideOnIce
|
||||
if $game_player.pbTerrainTag.ice && $game_player.can_move_in_direction?($game_player.direction)
|
||||
$PokemonGlobal.ice_sliding = true
|
||||
@@ -605,29 +593,6 @@ def pbMoveTowardPlayer(event)
|
||||
$PokemonMap&.addMovedEvent(event.id)
|
||||
end
|
||||
|
||||
def pbJumpToward(dist = 1, playSound = false, cancelSurf = false)
|
||||
x = $game_player.x
|
||||
y = $game_player.y
|
||||
case $game_player.direction
|
||||
when 2 then $game_player.jump(0, dist) # down
|
||||
when 4 then $game_player.jump(-dist, 0) # left
|
||||
when 6 then $game_player.jump(dist, 0) # right
|
||||
when 8 then $game_player.jump(0, -dist) # up
|
||||
end
|
||||
if $game_player.x != x || $game_player.y != y
|
||||
pbSEPlay("Player jump") if playSound
|
||||
$PokemonEncounters.reset_step_count if cancelSurf
|
||||
$game_temp.ending_surf = true if cancelSurf
|
||||
while $game_player.jumping?
|
||||
Graphics.update
|
||||
Input.update
|
||||
pbUpdateSceneMap
|
||||
end
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
# Bridges, cave escape points, and setting the heal point
|
||||
#===============================================================================
|
||||
|
||||
Reference in New Issue
Block a user