Skip to content

Commit

Permalink
Allow fixed_anim_speed to be turned off (#3703)
Browse files Browse the repository at this point in the history
  • Loading branch information
walt253 authored Nov 19, 2024
1 parent 7dc4019 commit ce9d464
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/config_crtrmodel.c
Original file line number Diff line number Diff line change
Expand Up @@ -1589,6 +1589,7 @@ TbBool parse_creaturemodel_appearance_blocks(long crtr_model,char *buf,long len,
if ((flags & CnfLd_AcceptPartial) == 0)
{
crstat->walking_anim_speed = 1;
crstat->fixed_anim_speed = false;
crstat->visual_range = 1;
crstat->swipe_idx = 0;
crstat->natural_death_kind = Death_Normal;
Expand Down Expand Up @@ -1775,10 +1776,16 @@ TbBool parse_creaturemodel_appearance_blocks(long crtr_model,char *buf,long len,
if (get_conf_parameter_single(buf, &pos, len, word_buf, sizeof(word_buf)) > 0)
{
k = atoi(word_buf);
if (k > 0)
if (k >= 0)
{
crstat->fixed_anim_speed = true;
crstat->fixed_anim_speed = k;
}
n++;
}
if (n < 1)
{
CONFWRNLOG("Incorrect value of \"%s\" parameter in [%s] block of %s file.",
COMMAND_TEXT(cmd_num), block_buf, config_textname);
}
break;
case ccr_comment:
Expand Down

0 comments on commit ce9d464

Please sign in to comment.