--- deliantra/server/common/living.C 2012/01/27 22:00:39 1.127 +++ deliantra/server/common/living.C 2012/11/12 03:14:32 1.129 @@ -1,24 +1,24 @@ /* * This file is part of Deliantra, the Roguelike Realtime MMORPG. - * + * * Copyright (©) 2005,2006,2007,2008,2009,2010,2011,2012 Marc Alexander Lehmann / Robin Redeker / the Deliantra team * Copyright (©) 2002 Mark Wedel & Crossfire Development Team * Copyright (©) 1992 Frank Tore Johansen - * + * * Deliantra is free software: you can redistribute it and/or modify it under * the terms of the Affero GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or (at your * option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the Affero GNU General Public License * and the GNU General Public License along with this program. If not, see * . - * + * * The authors can be reached via e-mail to */ @@ -110,13 +110,13 @@ */ const uint32 weight_limit[MAX_STAT + 1] = { - 200000, /* 0 */ - 250000, 300000, 350000, 400000, 500000, /* 5 */ - 600000, 700000, 800000, 900000, 1000000, /* 10 */ + 200000, /* 0 */ + 250000, 300000, 350000, 400000, 500000, /* 5 */ + 600000, 700000, 800000, 900000, 1000000, /* 10 */ 1100000, 1200000, 1300000, 1400000, 1500000, /* 15 */ 1650000, 1800000, 1950000, 2100000, 2250000, /* 20 */ 2400000, 2550000, 2700000, 2850000, 3000000, /* 25 */ - 3250000, 3500000, 3750000, 4000000, 4500000 /*30 */ + 3250000, 3500000, 3750000, 4000000, 4500000 /* 30 */ }; const int learn_spell[MAX_STAT + 1] = { @@ -998,14 +998,14 @@ ac -= tmp->stats.ac + tmp->magic; if (settings.spell_encumbrance == TRUE && type == PLAYER) - contr->encumbrance += 3 * tmp->weight / 1000; + contr->encumbrance += weight_to_kg_approx (3 * tmp->weight); } break; case SHIELD: if (settings.spell_encumbrance == TRUE && type == PLAYER) - contr->encumbrance += tmp->weight / 2000; + contr->encumbrance += weight_to_kg_approx (tmp->weight) >> 1; //FALLTHROUGH case RING: case AMULET: @@ -1049,13 +1049,13 @@ if (type == PLAYER) if (settings.spell_encumbrance) - contr->encumbrance += tmp->weight * 3 / 1000; + contr->encumbrance += weight_to_kg_approx (3 * tmp->weight); break; case ARMOUR: /* Only the best of these three are used: */ if (settings.spell_encumbrance == TRUE && type == PLAYER) - contr->encumbrance += tmp->weight / 1000; + contr->encumbrance += weight_to_kg_approx (tmp->weight); case BRACERS: case FORCE: @@ -1291,9 +1291,9 @@ * weight limit, then player suffers a speed reduction based on how * much above he is, and what is max carry is */ - float f = (carrying / 1000) - max_carry[stats.Str]; + double f = weight_to_kg_approx (carrying) - max_carry[stats.Str]; if (f > 0.f) - speed = speed / (1.f + f / max_carry[stats.Str]); + speed /= (1.f + f / max_carry[stats.Str]); } speed += bonus_speed / 10.f; /* Not affected by limits */