Fixed animation

This commit is contained in:
2025-11-09 18:50:02 -06:00
parent 943e775364
commit d054cf9e36
6 changed files with 13 additions and 23 deletions

View File

@@ -58,9 +58,7 @@ void sceneMapEntityGetPosition(const entity_t *entity, vec3 outPosition) {
// Add animation offset(s)
switch(entity->animation) {
case ENTITY_ANIM_WALK:
float_t animPercentage = (
(float_t)entity->animFrame / (float_t)ENTITY_ANIM_WALK_DURATION
);
float_t animPercentage = entity->animTime / ENTITY_ANIM_WALK_DURATION;
// Get facing rel, we know we moved from the inverse direction.
int8_t x, y;