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

Comparing deliantra/server/common/object.C (file contents):
Revision 1.3 by root, Sat Aug 26 08:44:05 2006 UTC vs.
Revision 1.7 by root, Tue Aug 29 05:03:54 2006 UTC

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.7 2006/08/29 05:03:54 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
546 op->slaying = NULL; 546 op->slaying = NULL;
547 op->skill = NULL; 547 op->skill = NULL;
548 op->msg = NULL; 548 op->msg = NULL;
549 op->materialname = NULL; 549 op->materialname = NULL;
550 op->lore = NULL; 550 op->lore = NULL;
551 op->current_weapon_script = NULL;
552 clear_object(op); 551 clear_object(op);
553} 552}
554 553
555/* Zero the key_values on op, decrementing the shared-string 554/* Zero the key_values on op, decrementing the shared-string
556 * refcounts and freeing the links. 555 * refcounts and freeing the links.
690 op->events = NULL; 689 op->events = NULL;
691 690
692 free_key_values(op); 691 free_key_values(op);
693 692
694 *(object_special *)op = *(object_special *)op2; 693 *(object_special *)op = *(object_special *)op2;
695 op->clone (op2); 694 op2->clone (op);
696 695
697 if(is_freed) SET_FLAG(op,FLAG_FREED); 696 if(is_freed) SET_FLAG(op,FLAG_FREED);
698 if(is_removed) SET_FLAG(op,FLAG_REMOVED); 697 if(is_removed) SET_FLAG(op,FLAG_REMOVED);
699 if(op->name!=NULL) add_refcount(op->name); 698 if(op->name!=NULL) add_refcount(op->name);
700 if(op->name_pl!=NULL) add_refcount(op->name_pl); 699 if(op->name_pl!=NULL) add_refcount(op->name_pl);
2639 if (tempfile == NULL) 2638 if (tempfile == NULL)
2640 { 2639 {
2641 LOG(llevError,"Error - Unable to read object temp file\n"); 2640 LOG(llevError,"Error - Unable to read object temp file\n");
2642 return NULL; 2641 return NULL;
2643 }; 2642 };
2643 object_thawer thawer (tempfile);
2644 load_object(tempfile,op,LO_NEWFILE,0); 2644 load_object(thawer,op,LO_NEWFILE,0);
2645 LOG(llevDebug," load str completed, object=%s\n",op->name); 2645 LOG(llevDebug," load str completed, object=%s\n",op->name);
2646 CLEAR_FLAG(op,FLAG_REMOVED); 2646 CLEAR_FLAG(op,FLAG_REMOVED);
2647 fclose(tempfile); 2647 fclose(tempfile);
2648 return op; 2648 return op;
2649} 2649}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines