Difference for server/main.c from version 1.75 to 1.76


version 1.75 version 1.76
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_main_c =   * static char *rcsid_main_c =
  *    "$Id: main.c,v 1.75 2003/03/19 08:09:59 mwedel Exp $";   *    "$Id: main.c,v 1.76 2003/09/13 05:02:11 mwedel Exp $";
  */   */
   
 /*  /*
     CrossFire, A Multiplayer game for X-windows      CrossFire, A Multiplayer game for X-windows
   
     Copyright (C) 2001 Mark Wedel & Crossfire Development Team      Copyright (C) 2001-2003 Mark Wedel & Crossfire Development Team
     Copyright (C) 1992 Frank Tore Johansen      Copyright (C) 1992 Frank Tore Johansen
   
     This program is free software; you can redistribute it and/or modify      This program is free software; you can redistribute it and/or modify
Line 26
 
Line 26
     The authors can be reached via e-mail at crossfire-devel@real-time.com      The authors can be reached via e-mail at crossfire-devel@real-time.com
 */  */
   
 #include <version.h>  
 #include <global.h>  #include <global.h>
 #include <object.h>  #include <object.h>
 #include <tod.h>  #include <tod.h>
Line 363
 
Line 362
     }      }
   
     /* Update any golems */      /* Update any golems */
     if(op->type == PLAYER && op->contr->golem != NULL) {      if(op->type == PLAYER && op->contr->ranges[range_golem] != NULL) {
  int i = find_free_spot(op->contr->golem->arch,newmap, x, y, 1, SIZEOFFREE+1);   int i = find_free_spot(op->contr->ranges[range_golem]->arch,newmap,
           x, y, 1, SIZEOFFREE+1);
   
  remove_ob(op->contr->golem);   remove_ob(op->contr->ranges[range_golem]);
  if (i==-1) {   if (i==-1) {
      remove_friendly_object(op->contr->golem);       remove_friendly_object(op->contr->ranges[range_golem]);
      free_object(op->contr->golem);       free_object(op->contr->ranges[range_golem]);
      op->contr->golem=NULL;       op->contr->ranges[range_golem]=NULL;
        op->contr->golem_count=0;
  }   }
  else {   else {
      object *tmp;       object *tmp;
      for (tmp=op->contr->golem; tmp!=NULL; tmp=tmp->more) {       for (tmp=op->contr->ranges[range_golem]; tmp!=NULL; tmp=tmp->more) {
  tmp->x = x + freearr_x[i]+ (tmp->arch==NULL?0:tmp->arch->clone.x);   tmp->x = x + freearr_x[i]+ (tmp->arch==NULL?0:tmp->arch->clone.x);
  tmp->y = y + freearr_y[i]+ (tmp->arch==NULL?0:tmp->arch->clone.y);   tmp->y = y + freearr_y[i]+ (tmp->arch==NULL?0:tmp->arch->clone.y);
  tmp->map = newmap;   tmp->map = newmap;
      }       }
      insert_ob_in_map(op->contr->golem, newmap, NULL,0);       insert_ob_in_map(op->contr->ranges[range_golem], newmap, NULL,0);
      op->contr->golem->direction = find_dir_2(op->x - op->contr->golem->x, op->y - op->contr->golem->y);       op->contr->ranges[range_golem]->direction =
    find_dir_2(op->x - op->contr->ranges[range_golem]->x,
       op->y - op->contr->ranges[range_golem]->y);
  }   }
     }      }
     op->direction=0;      op->direction=0;
Line 831
 
Line 834
  if (map!=NULL && (pl->ob == NULL || pl->ob->map!=map))   if (map!=NULL && (pl->ob == NULL || pl->ob->map!=map))
      continue;       continue;
  if (settings.casting_time == TRUE) {   if (settings.casting_time == TRUE) {
      if (pl->ob->casting > 0){       if (pl->ob->casting_time > 0){
  pl->ob->casting--;   pl->ob->casting_time--;
  pl->ob->start_holding = 1;   pl->ob->start_holding = 1;
      }       }
      /* set spell_state so we can update the range in stats field */       /* set spell_state so we can update the range in stats field */
      if ((pl->ob->casting == 0) && (pl->ob->start_holding ==1)){       if ((pl->ob->casting_time == 0) && (pl->ob->start_holding ==1)){
  pl->ob->start_holding = 0;   pl->ob->start_holding = 0;
  pl->ob->spell_state = 1;  
      }       }
  }   }
  do_some_living(pl->ob);   do_some_living(pl->ob);
Line 957
 
Line 959
      if (was_destroyed (op, tag))       if (was_destroyed (op, tag))
  continue;   continue;
  }   }
  if (settings.casting_time == TRUE && op->casting > 0)   if (settings.casting_time == TRUE && op->casting_time > 0)
      op->casting--;       op->casting_time--;
  if (op->speed_left <= 0)   if (op->speed_left <= 0)
      op->speed_left += FABS (op->speed);       op->speed_left += FABS (op->speed);
     }      }


Legend:
line(s) removed in v.1.75 
line(s) changed
 line(s) added in v.1.76

File made using version 1.98 of cvs2html by leaf at 2011-07-21 17:36