Crossfire Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CF: free() or free_object() ?



I know free_object() as the function for "chuck" objects which become
useless.
But the function, free() is used for this purpose in the file,
server/attack.c  
This is found by S.Yoshioka.
The function, free_object() is appropriate?

------ 8< ------- 8= -------- 8< ------

*** server/attack.c-	Wed Mar  3 17:35:32 1999
--- server/attack.c	Wed Mar  3 17:35:53 1999
***************
*** 948,954 ****
  		SET_FLAG(tmp, FLAG_UNAGGRESSIVE);
  	    j=find_first_free_spot(tmp->arch,op->map,op->x,op->y);
  	    if (j==-1) /* No spot to put this monster */
! 		free(tmp);
  	    else {
  		tmp->x=op->x+freearr_x[j],tmp->y=op->y+freearr_y[j];
  		insert_ob_in_map(tmp,op->map);
--- 948,954 ----
  		SET_FLAG(tmp, FLAG_UNAGGRESSIVE);
  	    j=find_first_free_spot(tmp->arch,op->map,op->x,op->y);
  	    if (j==-1) /* No spot to put this monster */
! 		free_object(tmp);
  	    else {
  		tmp->x=op->x+freearr_x[j],tmp->y=op->y+freearr_y[j];
  		insert_ob_in_map(tmp,op->map);

------ 8< ------- 8= -------- 8< --------

-------
--------------------------------------------------------------------------
Seikoh Nishita		      |	Dep't. of Information & Computer Sciences
			      |	Faculty of Engineering Science
[e-mail]		      |	Osaka University
s-nisita@ics.es.osaka-u.ac.jp |	Toyonaka, Osaka 560, Japan

-
[you can put yourself on the announcement list only or unsubscribe altogether
by sending an email stating your wishes to crossfire-request@ifi.uio.no]