mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-08 05:34:58 +00:00
Fixed "Set Event Location" (moveto) sending an event off-screen not making it disappear
This commit is contained in:
@@ -73,6 +73,7 @@ class Game_Character
|
|||||||
@bob_height = 0
|
@bob_height = 0
|
||||||
@wait_count = 0
|
@wait_count = 0
|
||||||
@moved_this_frame = false
|
@moved_this_frame = false
|
||||||
|
@moveto_happened = false
|
||||||
@locked = false
|
@locked = false
|
||||||
@prelock_direction = 0
|
@prelock_direction = 0
|
||||||
end
|
end
|
||||||
@@ -375,6 +376,7 @@ class Game_Character
|
|||||||
@real_x = @x * Game_Map::REAL_RES_X
|
@real_x = @x * Game_Map::REAL_RES_X
|
||||||
@real_y = @y * Game_Map::REAL_RES_Y
|
@real_y = @y * Game_Map::REAL_RES_Y
|
||||||
@prelock_direction = 0
|
@prelock_direction = 0
|
||||||
|
@moveto_happened = true
|
||||||
calculate_bush_depth
|
calculate_bush_depth
|
||||||
triggerLeaveTile
|
triggerLeaveTile
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -246,7 +246,7 @@ class Game_Event < Game_Character
|
|||||||
def should_update?(recalc = false)
|
def should_update?(recalc = false)
|
||||||
return @to_update if !recalc
|
return @to_update if !recalc
|
||||||
return true if @trigger && (@trigger == 3 || @trigger == 4)
|
return true if @trigger && (@trigger == 3 || @trigger == 4)
|
||||||
return true if @move_route_forcing
|
return true if @move_route_forcing || @moveto_happened
|
||||||
return true if @event.name[/update/i]
|
return true if @event.name[/update/i]
|
||||||
range = 2 # Number of tiles
|
range = 2 # Number of tiles
|
||||||
return false if self.screen_x - (@sprite_size[0] / 2) > Graphics.width + (range * Game_Map::TILE_WIDTH)
|
return false if self.screen_x - (@sprite_size[0] / 2) > Graphics.width + (range * Game_Map::TILE_WIDTH)
|
||||||
@@ -259,6 +259,7 @@ class Game_Event < Game_Character
|
|||||||
def update
|
def update
|
||||||
@to_update = should_update?(true)
|
@to_update = should_update?(true)
|
||||||
return if !@to_update
|
return if !@to_update
|
||||||
|
@moveto_happened = false
|
||||||
last_moving = moving?
|
last_moving = moving?
|
||||||
super
|
super
|
||||||
if !moving? && last_moving
|
if !moving? && last_moving
|
||||||
|
|||||||
Reference in New Issue
Block a user