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

Comparing cf.schmorp.de/server/common/loader.C (file contents):
Revision 1.60 by root, Fri Feb 16 22:21:45 2007 UTC vs.
Revision 1.62 by root, Mon Feb 19 19:10:31 2007 UTC

976object::read (object_thawer &f, maptile *map) 976object::read (object_thawer &f, maptile *map)
977{ 977{
978 assert (f.kw == KW_arch); 978 assert (f.kw == KW_arch);
979 979
980 archetype *arch = archetype::find (f.get_str ()); 980 archetype *arch = archetype::find (f.get_str ());
981
982 if (!arch)
983 {
984 LOG (llevError, "object refering to nonexistant archetype '%s'.\n", f.get_str ());
985 arch = archetype::find ("earthwall");
986 }
987
981 assert (arch); //D maybe use exception handling of sorts? 988 assert (arch); //D maybe use exception handling of sorts?
982 989
983 object *op = object::create (); 990 object *op = object::create ();
984 991
985 op->map = map; 992 op->map = map;
1006int 1013int
1007set_variable (object *op, char *buf) 1014set_variable (object *op, char *buf)
1008{ 1015{
1009 object_thawer f (buf, (AV *)0); 1016 object_thawer f (buf, (AV *)0);
1010 1017
1018 f.kw = KW_arch; // special hack so that parse_kv skips
1011 return op->parse_kv (f); 1019 return op->parse_kv (f);
1012} 1020}
1013 1021
1014/* This returns a string of the integer movement type */ 1022/* This returns a string of the integer movement type */
1015#if 0 1023#if 0

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines