Skip to content

Commit

Permalink
disabled roll animation in noclip or climbing state;
Browse files Browse the repository at this point in the history
removed condition that do nothing in Anim_SetNextFrame;
  • Loading branch information
TeslaRus committed Aug 25, 2016
1 parent 65dc1b3 commit f1a41fb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
5 changes: 2 additions & 3 deletions src/anim_state_control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ void ent_set_on_floor(entity_p ent, ss_animation_p ss_anim)

void ent_set_on_floor_after_climb(entity_p ent, ss_animation_p ss_anim)
{
ss_anim->onEndFrame = NULL;
/*animation_frame_p af = ss_anim->model->animations + ss_anim->current_animation;
if((ss_anim->changing_next >= 0x02) && (ss_anim->changing_next < 0x04))
{
Expand Down Expand Up @@ -327,11 +326,11 @@ int State_Control_Lara(struct entity_s *ent, struct ss_animation_s *ss_anim)
else if(cmd->jump)
{
if(!curr_fc->quicksand)
ss_anim->next_state = TR_STATE_LARA_JUMP_PREPARE; // jump sideways
ss_anim->next_state = TR_STATE_LARA_JUMP_PREPARE; // jump sideways
}
else if(cmd->roll)
{
if(!curr_fc->quicksand && ss_anim->current_animation != TR_ANIMATION_LARA_CLIMB_2CLICK)
if(!curr_fc->quicksand && (ent->move_type != MOVE_CLIMBING) && (ent->no_fix_all == 0x00))
{
ent->dir_flag = ENT_MOVE_FORWARD;
Entity_SetAnimation(ent, ANIM_TYPE_BASE, TR_ANIMATION_LARA_ROLL_BEGIN, 0);
Expand Down
10 changes: 1 addition & 9 deletions src/skeletal_model.c
Original file line number Diff line number Diff line change
Expand Up @@ -799,15 +799,7 @@ int Anim_SetNextFrame(struct ss_animation_s *ss_anim, float time)
ss_anim->current_animation = ss_anim->next_animation;
ss_anim->current_frame = ss_anim->next_frame;
ss_anim->next_frame = next_anim->next_frame;
if(ss_anim->next_animation != next_anim->next_anim->id)
{
ss_anim->next_animation = next_anim->next_anim->id;
ss_anim->frame_time = (float)ss_anim->next_frame * ss_anim->period + dt;
}
else
{
ss_anim->frame_time = (float)next_anim->max_frame * ss_anim->period;
}
ss_anim->next_animation = next_anim->next_anim->id;
ss_anim->frame_time = (float)ss_anim->next_frame * ss_anim->period + dt;
ss_anim->current_state = ss_anim->model->animations[ss_anim->next_animation].state_id;
ss_anim->next_state = ss_anim->current_state;
Expand Down

0 comments on commit f1a41fb

Please sign in to comment.