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

Comparing deliantra/server/common/loader.C (file contents):
Revision 1.70 by root, Tue Apr 17 18:40:31 2007 UTC vs.
Revision 1.72 by root, Sat Apr 21 12:28:31 2007 UTC

418 { "flying" , MOVE_FLY_LOW | MOVE_FLY_HIGH }, 418 { "flying" , MOVE_FLY_LOW | MOVE_FLY_HIGH },
419 { "fly_low" , MOVE_FLY_LOW }, 419 { "fly_low" , MOVE_FLY_LOW },
420 { "fly_high", MOVE_FLY_HIGH }, 420 { "fly_high", MOVE_FLY_HIGH },
421 { "swim" , MOVE_SWIM }, 421 { "swim" , MOVE_SWIM },
422 { "boat" , MOVE_BOAT }, 422 { "boat" , MOVE_BOAT },
423 { "ship" , MOVE_SHIP },
423 { "all" , MOVE_ALL }, 424 { "all" , MOVE_ALL },
424 }; 425 };
425 426
426 if (!str) 427 if (!str)
427 { 428 {
473 CLEAR_FLAG (op, flag) \ 474 CLEAR_FLAG (op, flag) \
474 475
475bool 476bool
476object::parse_kv (object_thawer &f) 477object::parse_kv (object_thawer &f)
477{ 478{
478 assert (f.kw == KW_object || f.kw == KW_arch);
479
480 if (f.kw == KW_object)
481 f.get (name); // preset name from object name
482
483 f.next ();
484
485 object *op_inv = inv; 479 object *op_inv = inv;
486 480
487 for (;;) 481 for (;;)
488 { 482 {
489 switch (f.kw) 483 switch (f.kw)
990 arch = archetype::find ("earthwall"); 984 arch = archetype::find ("earthwall");
991 } 985 }
992 986
993 assert (arch); //D maybe use exception handling of sorts? 987 assert (arch); //D maybe use exception handling of sorts?
994 988
989 f.next ();
990
995 object *op = object::create (); 991 object *op = object::create ();
996 992
997 op->map = map; 993 op->map = map;
998 arch->clone.copy_to (op); 994 arch->clone.copy_to (op);
999 // copy_to activates, this should be fixed properly 995 // copy_to activates, this should be fixed properly
1017int 1013int
1018set_variable (object *op, char *buf) 1014set_variable (object *op, char *buf)
1019{ 1015{
1020 object_thawer f (buf, (AV *)0); 1016 object_thawer f (buf, (AV *)0);
1021 1017
1022 f.kw = KW_arch; // special hack so that parse_kv skips 1018 f.next ();
1023 return op->parse_kv (f); 1019 return op->parse_kv (f);
1024} 1020}
1025 1021
1026/* This returns a string of the integer movement type */ 1022/* This returns a string of the integer movement type */
1027#if 0 1023#if 0

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines