Remove obsolete pause var for sprites

main
En Yi 2025-09-01 20:53:04 +08:00
parent 0d2753d505
commit 2dde39067e
3 changed files with 3 additions and 5 deletions

View File

@ -163,7 +163,6 @@ typedef struct _CSprite_t {
float rotation_speed; // Degree / s float rotation_speed; // Degree / s
Vector2 offset; Vector2 offset;
uint8_t depth; uint8_t depth;
bool pause;
} CSprite_t; } CSprite_t;
typedef struct _CMoveable_t { typedef struct _CMoveable_t {

View File

@ -1124,7 +1124,6 @@ void moveable_update_system(Scene_t* scene)
if (p_other_bbox != NULL) if (p_other_bbox != NULL)
{ {
any_solid |= p_other_bbox->solid; any_solid |= p_other_bbox->solid;
//any_solid |= true;
break; break;
} }
} }

View File

@ -39,7 +39,7 @@ static unsigned int player_sprite_transition_func(Entity_t* ent)
p_spr->node.flip &= ~1; p_spr->node.flip &= ~1;
} }
p_spr->pause = false; p_spr->anim_timer.pause = false;
if (p_move->ground_state & 1) if (p_move->ground_state & 1)
{ {
@ -54,7 +54,7 @@ static unsigned int player_sprite_transition_func(Entity_t* ent)
} }
else if (p_plr->ladder_state) else if (p_plr->ladder_state)
{ {
p_spr->pause = Vector2LengthSqr(p_ctrans->velocity) < 10.0f; p_spr->anim_timer.pause = Vector2LengthSqr(p_ctrans->velocity) < 10.0f;
return SPR_PLAYER_LADDER; return SPR_PLAYER_LADDER;
} }
else if (p_move->water_state & 1) else if (p_move->water_state & 1)
@ -179,7 +179,7 @@ static unsigned int player_finish_transition_func(Entity_t* ent)
// Due to index-from-0 // Due to index-from-0
if (p_spr->current_frame == p_spr->sprites[p_spr->current_idx].sprite->frame_count - 1) if (p_spr->current_frame == p_spr->sprites[p_spr->current_idx].sprite->frame_count - 1)
{ {
p_spr->pause = true; p_spr->anim_timer.pause = true;
//remove_entity(ent->manager, ent->m_id); //remove_entity(ent->manager, ent->m_id);
} }
return p_spr->current_idx; return p_spr->current_idx;