Skip to content

Commit 2c025d8

Browse files
tiagomartines11minggo
authored andcommitted
Fix actions with zero duration on NDK 16. (#18596)
1 parent 6164456 commit 2c025d8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cocos/2d/CCActionInterval.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@ void ActionInterval::step(float dt)
126126
}
127127

128128

129-
float updateDt = MAX (0, // needed for rewind. elapsed could be negative
130-
MIN(1, _elapsed / _duration)
131-
);
129+
float updateDt = std::max(0.0f, // needed for rewind. elapsed could be negative
130+
std::min(1.0f, _elapsed / _duration)
131+
);
132132

133133
if (sendUpdateEventToScript(updateDt, this)) return;
134134

0 commit comments

Comments
 (0)