carrying capacity

As suggested in the newsgroup, re-factor the calculation of carrcap
so that any change in strength or constitution affects your capacity.
The integer division was rounding off the result.
This commit is contained in:
cohrs
2003-03-22 17:25:09 +00:00
parent f6f89a2075
commit 2ae7f10dd9
2 changed files with 2 additions and 1 deletions

View File

@@ -20,6 +20,7 @@ don't use hcolor() for trapped chest gases when you aren't hallucinating
the age of a potion of oil from a bones file wasn't being handled correctly the age of a potion of oil from a bones file wasn't being handled correctly
putting gold in a container on the shop floor wasn't credited the way putting gold in a container on the shop floor wasn't credited the way
gold already in the container when dropped was credited gold already in the container when dropped was credited
avoid integer division rounding error when calculating carrying capacity
Platform- and/or Interface-Specific Fixes Platform- and/or Interface-Specific Fixes

View File

@@ -2111,7 +2111,7 @@ weight_cap()
{ {
register long carrcap; register long carrcap;
carrcap = (((ACURRSTR + ACURR(A_CON))/2)+1)*50; carrcap = 25*(ACURRSTR + ACURR(A_CON)) + 50;
if (Upolyd) { if (Upolyd) {
/* consistent with can_carry() in mon.c */ /* consistent with can_carry() in mon.c */
if (youmonst.data->mlet == S_NYMPH) if (youmonst.data->mlet == S_NYMPH)