--- deliantra/server/common/exp.C 2010/04/15 04:56:46 1.30 +++ deliantra/server/common/exp.C 2010/04/28 20:51:58 1.34 @@ -27,7 +27,7 @@ sint64 levels[MAXNUMLEVELS]; -static float exp_att_mult[NROFATTACKS + 2] = { +static const float exp_att_mult[NROFATTACKS + 2] = { 0.0, /* AT_PHYSICAL */ 0.0, /* AT_MAGIC */ 0.0, /* AT_FIRE */ @@ -50,7 +50,7 @@ 0.0 /* AT_COUNTERSPELL */ }; -static float exp_prot_mult[NROFATTACKS + 2] = { +static const float exp_prot_mult[NROFATTACKS + 2] = { 0.4, /* AT_PHYSICAL */ 0.5, /* AT_MAGIC */ 0.1, /* AT_FIRE */ @@ -165,13 +165,10 @@ void init_experience () { - char buf[MAX_BUF], *cp; - int lastlevel = 0, comp; - sint64 lastexp = -1, tmpexp; + int lastlevel = 0; + sint64 lastexp = -1; - sprintf (buf, "%s/exp_table", settings.confdir); - - object_thawer thawer (buf); + object_thawer thawer (settings.datadir, "exp_table"); if (!thawer) { @@ -181,7 +178,7 @@ if (thawer.kw != KW_max_level) { - thawer.parse_error ("experience table file", "max_level"); + thawer.parse_error ("experience table file"); return; } @@ -191,6 +188,7 @@ while (thawer.next_line ()) { + sint64 tmpexp; thawer.get (tmpexp); /* Do some sanity checking - if value is bogus, just exit because