Anti-lag script fix for edge case
This fix makes it such that even if a character sprite is offscreen it will still update its camera position, to prevent issues when a character sprite teleports offscreen (but their sprite does not because it doesn't update).
This commit is contained in:
parent
31d90b8a66
commit
390cc74889
|
|
@ -94,6 +94,15 @@ class Sprite_Character
|
|||
end
|
||||
end
|
||||
#--------------------------------------------------------------------------
|
||||
# * Frame Update Fast (only position)
|
||||
#--------------------------------------------------------------------------
|
||||
def update_fast
|
||||
# Set sprite coordinates
|
||||
self.x = @character.screen_x
|
||||
self.y = @character.screen_y
|
||||
self.z = @character.screen_z(@ch)
|
||||
end
|
||||
#--------------------------------------------------------------------------
|
||||
# * Sprite attribute wrapper
|
||||
#--------------------------------------------------------------------------
|
||||
def self.sprite_attr(*args)
|
||||
|
|
|
|||
|
|
@ -256,6 +256,8 @@ class Spriteset_Map
|
|||
(sprite.character.real_y + (sprite.oy*4) > ($game_map.display_y) - 128) &&
|
||||
(sprite.character.real_y - (sprite.oy*4) < ($game_map.display_y) + (17 * 128)))
|
||||
sprite.update
|
||||
else
|
||||
sprite.update_fast
|
||||
end
|
||||
end
|
||||
# Update footprints
|
||||
|
|
|
|||
Loading…
Reference in New Issue