diff options
Diffstat (limited to 'src/crepe/system/AnimatorSystem.cpp')
| -rw-r--r-- | src/crepe/system/AnimatorSystem.cpp | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/src/crepe/system/AnimatorSystem.cpp b/src/crepe/system/AnimatorSystem.cpp index 6a84150..ee00728 100644 --- a/src/crepe/system/AnimatorSystem.cpp +++ b/src/crepe/system/AnimatorSystem.cpp @@ -22,11 +22,11 @@ void AnimatorSystem::update() {  		int cycle_end = (a.cycle_end == -1) ? a.row : cycle_end;  		int total_frames = cycle_end - a.cycle_start; -  		int curr_frame = static_cast<int>(elapsed_time / frame_duration) % total_frames;  		a.curr_row = a.cycle_start + curr_frame; -		a.spritesheet.mask.x = std::clamp((a.curr_row * a.spritesheet.mask.w - a.offset_x), 0, a.spritesheet.mask.w); +		a.spritesheet.mask.x = std::clamp((a.curr_row * a.spritesheet.mask.w - a.offset_x), 0, +										  a.spritesheet.mask.w);  		a.spritesheet.mask.y = (a.curr_col * a.spritesheet.mask.h);  		if (!a.looping && curr_frame == total_frames) { |