version 1.66 | | version 1.67 |
---|
| | |
/* | | /* |
* static char *rcsid_map_c = | | * static char *rcsid_map_c = |
* "$Id: map.c,v 1.66 2004/08/24 06:37:41 mwedel Exp $"; | | * "$Id: map.c,v 1.67 2004/10/15 07:09:39 mwedel Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
bufstate = LO_REPEAT; | | bufstate = LO_REPEAT; |
| | |
/* if the archetype for the object is null, means that we | | /* if the archetype for the object is null, means that we |
* got an invalid object. Don't do anythign with it - the game | | * got an invalid object. Don't do anything with it - the game |
* or editor will not be able to do anything with it either. | | * or editor will not be able to do anything with it either. |
*/ | | */ |
if (op->arch==NULL) { | | if (op->arch==NULL) { |
if (op->name!=NULL) | | LOG(llevDebug,"Discarding object without arch: %s\n", op->name?op->name:"(null)"); |
LOG(llevDebug,"Discarded object %s - invalid archetype.\n",op->name); | | |
continue; | | continue; |
} | | } |
| | |
| | |
insert_ob_in_map(op,m,op,INS_NO_MERGE | INS_NO_WALK_ON | INS_ABOVE_FLOOR_ONLY); | | insert_ob_in_map(op,m,op,INS_NO_MERGE | INS_NO_WALK_ON | INS_ABOVE_FLOOR_ONLY); |
else | | else |
insert_ob_in_map(op,m,op,INS_NO_MERGE | INS_NO_WALK_ON | INS_ON_TOP); | | insert_ob_in_map(op,m,op,INS_NO_MERGE | INS_NO_WALK_ON | INS_ON_TOP); |
if (op->inv) { | | |
object *invop, *next; | | |
| | |
/* Clear out any objects without archetypes, as they will just cause | | |
* crashes later on. | | |
*/ | | |
for (invop = op->inv; invop; invop=next) { | | |
next = invop->above; | | |
if (!invop->arch) { | | |
LOG(llevDebug,"Discarding object without arch: %s\n", invop->name?invop->name:"(null)"); | | |
remove_ob(invop); | | |
free_object(invop); | | |
} | | |
} | | |
sum_weight(op); | | |
} | | |
prev=op,last_more=op; | | prev=op,last_more=op; |
break; | | break; |
| | |