Refine how the raycaster.cpp uses animations so there's less back-and-forth on the intrect.

This commit is contained in:
Zed A. Shaw 2026-02-24 22:51:55 -05:00
parent cded8a937e
commit 594be65f45
3 changed files with 18 additions and 5 deletions

View file

@ -106,11 +106,8 @@ inline void step_animation(DinkyECS::World& world, DinkyECS::Entity entity, sf::
if(anim != nullptr && anim->playing) {
anim->update();
anim->apply(sprite);
anim->apply(sprite, in_texture);
anim->motion(sprite, position, scale);
auto& old_rect = sprite.getTextureRect();
in_texture.position.x += old_rect.position.x;
}
sprite.setScale(scale);