Skip to content
This repository was archived by the owner on Feb 24, 2025. It is now read-only.

Commit f1a41fb

Browse files
committed
disabled roll animation in noclip or climbing state;
removed condition that do nothing in Anim_SetNextFrame;
1 parent 65dc1b3 commit f1a41fb

File tree

2 files changed

+3
-12
lines changed

2 files changed

+3
-12
lines changed

src/anim_state_control.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ void ent_set_on_floor(entity_p ent, ss_animation_p ss_anim)
8080

8181
void ent_set_on_floor_after_climb(entity_p ent, ss_animation_p ss_anim)
8282
{
83-
ss_anim->onEndFrame = NULL;
8483
/*animation_frame_p af = ss_anim->model->animations + ss_anim->current_animation;
8584
if((ss_anim->changing_next >= 0x02) && (ss_anim->changing_next < 0x04))
8685
{
@@ -327,11 +326,11 @@ int State_Control_Lara(struct entity_s *ent, struct ss_animation_s *ss_anim)
327326
else if(cmd->jump)
328327
{
329328
if(!curr_fc->quicksand)
330-
ss_anim->next_state = TR_STATE_LARA_JUMP_PREPARE; // jump sideways
329+
ss_anim->next_state = TR_STATE_LARA_JUMP_PREPARE; // jump sideways
331330
}
332331
else if(cmd->roll)
333332
{
334-
if(!curr_fc->quicksand && ss_anim->current_animation != TR_ANIMATION_LARA_CLIMB_2CLICK)
333+
if(!curr_fc->quicksand && (ent->move_type != MOVE_CLIMBING) && (ent->no_fix_all == 0x00))
335334
{
336335
ent->dir_flag = ENT_MOVE_FORWARD;
337336
Entity_SetAnimation(ent, ANIM_TYPE_BASE, TR_ANIMATION_LARA_ROLL_BEGIN, 0);

src/skeletal_model.c

+1-9
Original file line numberDiff line numberDiff line change
@@ -799,15 +799,7 @@ int Anim_SetNextFrame(struct ss_animation_s *ss_anim, float time)
799799
ss_anim->current_animation = ss_anim->next_animation;
800800
ss_anim->current_frame = ss_anim->next_frame;
801801
ss_anim->next_frame = next_anim->next_frame;
802-
if(ss_anim->next_animation != next_anim->next_anim->id)
803-
{
804-
ss_anim->next_animation = next_anim->next_anim->id;
805-
ss_anim->frame_time = (float)ss_anim->next_frame * ss_anim->period + dt;
806-
}
807-
else
808-
{
809-
ss_anim->frame_time = (float)next_anim->max_frame * ss_anim->period;
810-
}
802+
ss_anim->next_animation = next_anim->next_anim->id;
811803
ss_anim->frame_time = (float)ss_anim->next_frame * ss_anim->period + dt;
812804
ss_anim->current_state = ss_anim->model->animations[ss_anim->next_animation].state_id;
813805
ss_anim->next_state = ss_anim->current_state;

0 commit comments

Comments
 (0)