mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Fixed Database animations' position not moving the animation for exclamations
This commit is contained in:
@@ -176,9 +176,9 @@ class Sprite_Character < RPG::Sprite
|
||||
self.z = @character.screen_z(@ch)
|
||||
self.opacity = @character.opacity
|
||||
self.blend_type = @character.blend_type
|
||||
if @character.animation_id != 0
|
||||
if @character.animation_id && @character.animation_id != 0
|
||||
animation = $data_animations[@character.animation_id]
|
||||
animation(animation, true)
|
||||
animation(animation, true, @character.animation_height || 3, @character.animation_regular_tone || false)
|
||||
@character.animation_id = 0
|
||||
end
|
||||
@reflection&.update
|
||||
|
||||
@@ -28,12 +28,13 @@ class SpriteAnimation
|
||||
dispose_loop_animation
|
||||
end
|
||||
|
||||
def animation(animation, hit, height = 3)
|
||||
def animation(animation, hit, height = 3, no_tone = false)
|
||||
dispose_animation
|
||||
@_animation = animation
|
||||
return if @_animation.nil?
|
||||
@_animation_hit = hit
|
||||
@_animation_height = height
|
||||
@_animation_no_tone = no_tone
|
||||
@_animation_duration = @_animation.frame_max
|
||||
@_animation_index = -1
|
||||
fr = 20
|
||||
@@ -207,7 +208,7 @@ class SpriteAnimation
|
||||
sprite.zoom_y = cell_data[i, 3] / 100.0
|
||||
sprite.angle = cell_data[i, 4]
|
||||
sprite.mirror = (cell_data[i, 5] == 1)
|
||||
sprite.tone = self.tone
|
||||
sprite.tone = self.tone if !@_animation_no_tone
|
||||
sprite.opacity = cell_data[i, 6] * self.opacity / 255.0
|
||||
sprite.blend_type = cell_data[i, 7]
|
||||
end
|
||||
@@ -301,6 +302,9 @@ class Spriteset_Map
|
||||
_animationSprite_initialize(map)
|
||||
end
|
||||
|
||||
# Used to display animations that remain in the same location on the map.
|
||||
# Typically for grass rustling and dust clouds, and other animations that
|
||||
# aren't relative to an event.
|
||||
def addUserAnimation(animID, x, y, tinting = false, height = 3)
|
||||
sprite = AnimationContainerSprite.new(animID, self.map, x, y, @@viewport1, tinting, height)
|
||||
addUserSprite(sprite)
|
||||
|
||||
Reference in New Issue
Block a user