Skip to content

Commit

Permalink
Merge pull request #49 from Jupeyy/pr_abs_anim_time
Browse files Browse the repository at this point in the history
Use abs for anim times, since the time offset can be negative
  • Loading branch information
Jupeyy authored Jan 8, 2025
2 parents 7400b5f + d636c8e commit d9a8550
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion game/client-render-base/src/map/render_tools.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ impl RenderTools {
if !max_point_time.is_zero() {
let time_diff = max_point_time.saturating_sub(*min_point_time);
time_nanos = time::Duration::nanoseconds(
(time_nanos.whole_nanoseconds() % time_diff.as_nanos() as i128) as i64,
(time_nanos.whole_nanoseconds().abs() % time_diff.as_nanos() as i128) as i64,
) + *min_point_time;
} else {
time_nanos = time::Duration::nanoseconds(0);
Expand Down

0 comments on commit d9a8550

Please sign in to comment.