[CF-Devel] patch for generators to create special ability mo

Mark Wedel mwedel at sonic.net
Wed Apr 17 00:21:00 CDT 2002


Tim Rightnour wrote:

>
     
      On 16-Apr-02 Norbert Irmer wrote:
     
     >
     
     
     >>
     
     Only problem now is, that the generator shouldn't get destroyed, or else 
     
     >>
     
     you have the
     
     >>
     
     single head part of an electric dragon in your map (this doesn't crashes 
     
     >>
     
     the server, but
     
     >>
     
     looks wrong)
     
     >>
     
     
     >
     
     
     >
     
      Couldn't you modify the routines that destroy objects to special case
     
     >
     
      generators and destroy thier inventory?
     
     

  Yep - probably around line 1450 in server/attack.c.  If FLAG_GENERATOR is set, 
then something like

while (op->inv) {
	tmp = op->inv;
	 remove_ob(tmp);
	 free_ob(tmp) ;
  }

  is probably all that is needed.



    
    


More information about the crossfire mailing list