1 | /* |
1 | /* |
2 | * static char *rcsid_object_c = |
2 | * static char *rcsid_object_c = |
3 | * "$Id: object.C,v 1.3 2006/08/26 08:44:05 root Exp $"; |
3 | * "$Id: object.C,v 1.6 2006/08/28 14:05:23 root Exp $"; |
4 | */ |
4 | */ |
5 | |
5 | |
6 | /* |
6 | /* |
7 | CrossFire, A Multiplayer game for X-windows |
7 | CrossFire, A Multiplayer game for X-windows |
8 | |
8 | |
… | |
… | |
690 | op->events = NULL; |
690 | op->events = NULL; |
691 | |
691 | |
692 | free_key_values(op); |
692 | free_key_values(op); |
693 | |
693 | |
694 | *(object_special *)op = *(object_special *)op2; |
694 | *(object_special *)op = *(object_special *)op2; |
695 | op->clone (op2); |
695 | op2->clone (op); |
696 | |
696 | |
697 | if(is_freed) SET_FLAG(op,FLAG_FREED); |
697 | if(is_freed) SET_FLAG(op,FLAG_FREED); |
698 | if(is_removed) SET_FLAG(op,FLAG_REMOVED); |
698 | if(is_removed) SET_FLAG(op,FLAG_REMOVED); |
699 | if(op->name!=NULL) add_refcount(op->name); |
699 | if(op->name!=NULL) add_refcount(op->name); |
700 | if(op->name_pl!=NULL) add_refcount(op->name_pl); |
700 | if(op->name_pl!=NULL) add_refcount(op->name_pl); |
… | |
… | |
2639 | if (tempfile == NULL) |
2639 | if (tempfile == NULL) |
2640 | { |
2640 | { |
2641 | LOG(llevError,"Error - Unable to read object temp file\n"); |
2641 | LOG(llevError,"Error - Unable to read object temp file\n"); |
2642 | return NULL; |
2642 | return NULL; |
2643 | }; |
2643 | }; |
|
|
2644 | object_thawer thawer (tempfile); |
2644 | load_object(tempfile,op,LO_NEWFILE,0); |
2645 | load_object(thawer,op,LO_NEWFILE,0); |
2645 | LOG(llevDebug," load str completed, object=%s\n",op->name); |
2646 | LOG(llevDebug," load str completed, object=%s\n",op->name); |
2646 | CLEAR_FLAG(op,FLAG_REMOVED); |
2647 | CLEAR_FLAG(op,FLAG_REMOVED); |
2647 | fclose(tempfile); |
2648 | fclose(tempfile); |
2648 | return op; |
2649 | return op; |
2649 | } |
2650 | } |