ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/common/material.C
(Generate patch)

Comparing deliantra/server/common/material.C (file contents):
Revision 1.12 by root, Thu Apr 15 21:49:15 2010 UTC vs.
Revision 1.13 by root, Wed Apr 28 19:49:50 2010 UTC

192//-GPL 192//-GPL
193 193
194void 194void
195load_materials () 195load_materials ()
196{ 196{
197 char filename[MAX_BUF];
198
199 sprintf (filename, "%s/materials", settings.datadir);
200 LOG (llevDebug, "Reading material type data from %s...\n", filename);
201
202 //TODO: somehow free old materials, or update them in-place 197 //TODO: somehow free old materials, or update them in-place
203 // currently we effectively leak them. 198 // currently we effectively leak them.
204 material_null.next = 0; materialt = &material_null; 199 material_null.next = 0; materialt = &material_null;
205 200
206 object_thawer thawer (filename); 201 object_thawer thawer (settings.datadir, "materials");
207 202
208 if (!thawer) 203 if (!thawer)
209 { 204 {
210 LOG (llevError, "Cannot open %s for reading\n", filename); 205 LOG (llevError, "Cannot open %s for reading\n", thawer.name);
211 goto done; 206 goto done;
212 } 207 }
213 208
214 while (thawer.kw != KW_name) 209 while (thawer.kw != KW_name)
215 { 210 {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines