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

Comparing deliantra/server/common/arch.C (file contents):
Revision 1.53 by root, Tue Apr 17 18:40:31 2007 UTC vs.
Revision 1.56 by root, Wed Apr 18 07:59:55 2007 UTC

309// dire hack, need to rationalise 309// dire hack, need to rationalise
310void 310void
311overwrite (archetype *at, object *op) 311overwrite (archetype *at, object *op)
312{ 312{
313 at->clone = *op; 313 at->clone = *op;
314
315 at->clone.arch = at; 314 at->clone.arch = at;
315
316 at->clone.inv = op->inv; op->inv = 0; 316 at->clone.inv = op->inv; op->inv = 0;
317 317
318 op->destroy (); 318 op->destroy ();
319} 319}
320 320
330 330
331 coroapi::cede_to_tick_every (100); 331 coroapi::cede_to_tick_every (100);
332 332
333 for (;;) 333 for (;;)
334 { 334 {
335 object *op = object::create ();
335 archetype *at = get (f.get_str ()); 336 archetype *at = get (f.get_str ());
336 object *op = object::create (); 337 f.get (op->name);
338 f.next ();
339
340#if 0
341 if (f.kw == KW_inherit)
342 {
343 if (archetype *at = find (f.get_str ()))
344 *op = at->clone;
345 else
346 LOG (llevError, "archetype '%s' tries to inherit from non-existent archetype '%s'.\n",
347 &at->name, f.get_str ());
348
349 f.next ();
350 }
351#endif
337 352
338 if (!op->parse_kv (f)) 353 if (!op->parse_kv (f))
339 goto fail; 354 goto fail;
340 355
341 parts.push_back (std::make_pair (at, op)); 356 parts.push_back (std::make_pair (at, op));
342 357
343 if (f.kw != KW_more) 358 if (f.kw != KW_more)
344 break; 359 break;
345 360
346 f.next (); 361 f.next ();
362
347 assert (f.kw == KW_object); 363 if (f.kw != KW_object)
364 {
365 f.parse_error ("more object");
366 goto fail;
367 }
348 } 368 }
349 369
350 { 370 {
351 archetype *head = parts.front ().first; 371 archetype *head = parts.front ().first;
352 372

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines