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

Norbert Irmer norbert.irmer at t-online.de
Wed Apr 17 08:02:29 CDT 2002


Mark Wedel wrote:

>
     
      Tim Rightnour wrote:
     
     >
     
     
     >>
     
      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.
     
     

Yes, this solves the problem.

I have encountered another problem. When i put fog into the inventory of 
a generator,
the server crashes after some time. I suppose the reason is, that fog 
itself is a
generator, which destroys itself after one generation (probably to 
achieve the
random fog movement?) and it isn't expected that it is in the inventory of
another object. But i am not sure. Is it possible to do a debug build ?
Perhaps with 'configure --with-debug' ?







    
    


More information about the crossfire mailing list