Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
16934c74
Unverified
Commit
16934c74
authored
Feb 20, 2019
by
Rémi Verschelde
Committed by
GitHub
Feb 20, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #26068 from luizcarlos1405/master
Fix AnimationPlayer jumping to the beggining after ending on editor.
parents
8107fc98
e27bbb07
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
animation_player.cpp
scene/animation/animation_player.cpp
+8
-4
No files found.
scene/animation/animation_player.cpp
View file @
16934c74
...
...
@@ -938,7 +938,6 @@ void AnimationPlayer::_animation_process(float p_delta) {
}
else
{
//stop();
playing
=
false
;
playback
.
current
.
pos
=
0
;
_set_process
(
false
);
if
(
end_notify
)
emit_signal
(
SceneStringNames
::
get_singleton
()
->
animation_finished
,
playback
.
assigned
);
...
...
@@ -1196,9 +1195,14 @@ void AnimationPlayer::play(const StringName &p_name, float p_custom_blend, float
if
(
c
.
assigned
!=
name
)
{
// reset
c
.
current
.
pos
=
p_from_end
?
c
.
current
.
from
->
animation
->
get_length
()
:
0
;
}
else
if
(
p_from_end
&&
c
.
current
.
pos
==
0
)
{
// Animation reset BUT played backwards, set position to the end
c
.
current
.
pos
=
c
.
current
.
from
->
animation
->
get_length
();
}
else
{
if
(
p_from_end
&&
c
.
current
.
pos
==
0
)
{
// Animation reset BUT played backwards, set position to the end
c
.
current
.
pos
=
c
.
current
.
from
->
animation
->
get_length
();
}
else
if
(
!
p_from_end
&&
c
.
current
.
pos
==
c
.
current
.
from
->
animation
->
get_length
())
{
// Animation resumed but already ended, set position to the beggining
c
.
current
.
pos
=
0
;
}
}
c
.
current
.
speed_scale
=
p_custom_scale
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment