From ce9d464be604dab427f153de8b7c9b5911f89d38 Mon Sep 17 00:00:00 2001 From: walter253 <130906143+walt253@users.noreply.github.com> Date: Tue, 19 Nov 2024 20:26:46 +0100 Subject: [PATCH] Allow fixed_anim_speed to be turned off (#3703) --- src/config_crtrmodel.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/config_crtrmodel.c b/src/config_crtrmodel.c index 63d3b89f6c..4668fbd5a0 100644 --- a/src/config_crtrmodel.c +++ b/src/config_crtrmodel.c @@ -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; @@ -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: