--- deliantra/server/common/exp.C 2010/04/28 20:51:58 1.34 +++ deliantra/server/common/exp.C 2011/12/31 06:18:01 1.38 @@ -1,7 +1,7 @@ /* * This file is part of Deliantra, the Roguelike Realtime MMORPG. * - * Copyright (©) 2005,2006,2007,2008,2009,2010 Marc Alexander Lehmann / Robin Redeker / the Deliantra team + * Copyright (©) 2005,2006,2007,2008,2009,2010,2011 Marc Alexander Lehmann / Robin Redeker / the Deliantra team * Copyright (©) 2002 Mark Wedel & Crossfire Development Team * Copyright (©) 1992 Frank Tore Johansen * @@ -150,20 +150,14 @@ sint64 level_to_min_exp (int level) { - if (level <= 0) - return 0; - else - return levels [min (level, settings.max_level)]; + return levels [clamp (level, 0, settings.max_level)]; } /* This loads the experience table from the exp_table - * file. This tends to exit on any errors, since it - * populates the table as it goes along, so if there - * are errors, the table is likely in an inconsistent - * state. + * file. */ void -init_experience () +reload_exp_table () { int lastlevel = 0; sint64 lastexp = -1; @@ -172,7 +166,7 @@ if (!thawer) { - LOG (llevError, "unable to parse experience table file"); + LOG (llevError, "unable to load experience table file"); return; }