Skip to content

Commit

Permalink
Fix incorrect scaling of monster hearing and smell
Browse files Browse the repository at this point in the history
  • Loading branch information
tomm authored and NickMcConnell committed Dec 4, 2022
1 parent 3ed1513 commit 8404a3e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mon-init.c
Original file line number Diff line number Diff line change
Expand Up @@ -1202,7 +1202,7 @@ static enum parser_error parse_monster_hearing(struct parser *p) {
if (!r)
return PARSE_ERROR_MISSING_RECORD_HEADER;
/* Assumes max_sight is 20, so we adjust in case it isn't */
r->hearing = parser_getint(p, "hearing") * 20 / z_info->max_sight;
r->hearing = parser_getint(p, "hearing") * z_info->max_sight / 20;
return PARSE_ERROR_NONE;
}

Expand All @@ -1212,7 +1212,7 @@ static enum parser_error parse_monster_smell(struct parser *p) {
if (!r)
return PARSE_ERROR_MISSING_RECORD_HEADER;
/* Assumes max_sight is 20, so we adjust in case it isn't */
r->smell = parser_getint(p, "smell") * 20 / z_info->max_sight;
r->smell = parser_getint(p, "smell") * z_info->max_sight / 20;
return PARSE_ERROR_NONE;
}

Expand Down

0 comments on commit 8404a3e

Please sign in to comment.