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

Comparing deliantra/server/common/loader.l (file contents):
Revision 1.10 by root, Sun Aug 27 16:15:11 2006 UTC vs.
Revision 1.12 by root, Mon Aug 28 07:07:41 2006 UTC

1%{ 1%{
2/* 2/*
3 * static char *rcsid_object_c = 3 * static char *rcsid_object_c =
4 * "$Id: loader.l,v 1.10 2006/08/27 16:15:11 root Exp $"; 4 * "$Id: loader.l,v 1.12 2006/08/28 07:07:41 root Exp $";
5 */ 5 */
6 6
7/* 7/*
8 CrossFire, A Multiplayer game for X-windows 8 CrossFire, A Multiplayer game for X-windows
9 9
743 char *yv=yval(); 743 char *yv=yval();
744 744
745 op->arch=find_archetype(yv); 745 op->arch=find_archetype(yv);
746 if (op->arch!=NULL) { 746 if (op->arch!=NULL) {
747 copy_object(&op->arch->clone,op); 747 copy_object(&op->arch->clone,op);
748 op->instantiate ();
749 } else if (!arch_init) { 748 } else if (!arch_init) {
750 if (op->name) free_string(op->name); 749 if (op->name) free_string(op->name);
751 /* record the name of the broken object */ 750 /* record the name of the broken object */
752 op->name = add_string(yv); 751 op->name = add_string(yv);
753 } 752 }
768^more{WS}$ { /* We need to record that this is a multipart object, 767^more{WS}$ { /* We need to record that this is a multipart object,
769 * so the calling function can glue things back together 768 * so the calling function can glue things back together
770 */ 769 */
771 ismore=1; 770 ismore=1;
772 } 771 }
773
774^end{WS}$ { check_loaded_object(op); 772^end{WS}$ { check_loaded_object(op);
775 thawer.get (op); 773
774 if (!arch_init)
775 op->instantiate ();
776
776 if (ismore) return LL_MORE; 777 if (ismore) return LL_MORE;
777 else return LL_NORMAL; 778 else return LL_NORMAL;
778 } 779 }
780^oid{S} {
781 thawer.get (op, IVAL);
782 }
779^last_heal{S} op->last_heal = IVAL; 783^last_heal{S} op->last_heal = IVAL;
780^last_sp{S} op->last_sp = IVAL; 784^last_sp{S} op->last_sp = IVAL;
781^last_grace{S} op->last_grace = IVAL; 785^last_grace{S} op->last_grace = IVAL;
782^last_eat{S} op->last_eat = IVAL; 786^last_eat{S} op->last_eat = IVAL;
783^speed{S} { op->speed = FVAL; 787^speed{S} { op->speed = FVAL;
2082 if (!(flag&2)) { 2086 if (!(flag&2)) {
2083 remove_ob(op); 2087 remove_ob(op);
2084 free_object (op); 2088 free_object (op);
2085 } 2089 }
2086 2090
2091 freezer.put (fp, op);
2087 fprintf(fp,"end\n"); 2092 fprintf(fp,"end\n");
2088 freezer.put (op);
2089} 2093}
2090 2094
2091void insert_event(object* op, int etype, char *ehook, char *eplug, char *eoptions) 2095void insert_event(object* op, int etype, char *ehook, char *eplug, char *eoptions)
2092{ 2096{
2093 event *evt; 2097 event *evt;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines