--- deliantra/server/common/material.C 2010/03/26 00:59:20 1.9 +++ deliantra/server/common/material.C 2010/04/28 19:49:50 1.13 @@ -1,7 +1,7 @@ /* * This file is part of Deliantra, the Roguelike Realtime MMORPG. * - * Copyright (©) 2005,2006,2007,2008,2009 Marc Alexander Lehmann / Robin Redeker / the Deliantra team + * Copyright (©) 2005,2006,2007,2008,2009,2010 Marc Alexander Lehmann / Robin Redeker / the Deliantra team * Copyright (©) 2002 Mark Wedel & Crossfire Development Team * Copyright (©) 1992 Frank Tore Johansen * @@ -194,19 +194,15 @@ void load_materials () { - char filename[MAX_BUF]; - - sprintf (filename, "%s/materials", settings.datadir); - LOG (llevDebug, "Reading material type data from %s...\n", filename); - //TODO: somehow free old materials, or update them in-place + // currently we effectively leak them. material_null.next = 0; materialt = &material_null; - object_thawer thawer (filename); + object_thawer thawer (settings.datadir, "materials"); if (!thawer) { - LOG (llevError, "Cannot open %s for reading\n", filename); + LOG (llevError, "Cannot open %s for reading\n", thawer.name); goto done; } @@ -299,7 +295,7 @@ goto done; default: - if (!thawer.parse_error ("materials file", "materials")) + if (!thawer.parse_error ("materials file")) goto done; break; }