Difference for server/main.c from version 1.4 to 1.5


version 1.4 version 1.5
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_main_c =   * static char *rcsid_main_c =
  *    "$Id: main.c,v 1.4 1999/07/13 06:03:04 cvs Exp $";   *    "$Id: main.c,v 1.5 1999/08/14 13:35:12 damn Exp $";
  */   */
   
 /*  /*
Line 249
 
Line 249
  }   }
   
  /* pick a new pathname for the new map:  it is of the form   /* pick a new pathname for the new map:  it is of the form
    oldmapname_x_y with underscores instead of '/' and '.', with      * oldmapname_x_y with underscores instead of '/' and '.', with
    the entrance coordinates tacked on. */      * the entrance coordinates tacked on. */
  sprintf(newmap_name,"/random/%s_%d_%d",oldmap_name,exit_ob->x,exit_ob->y);   sprintf(newmap_name,"/random/%s_%d_%d",oldmap_name,exit_ob->x,exit_ob->y);
   
  /* now to generate the actual map. */   /* now to generate the actual map. */
Line 268
 
Line 268
    }     }
  }   }
  if (EXIT_PATH(exit_ob)) {   if (EXIT_PATH(exit_ob)) {
         /* If we're already in a unique map, get the map's original path from its basename -- DAMN */
         if (exit_ob->map && exit_ob->map->path) {
    sprintf(apartment, "%s/%s/%s/", settings.localdir, settings.playerdir, op->name);
    if (!strncmp(exit_ob->map->path, apartment, strlen(apartment))) {
      char *t;
      LOG(llevDebug,"%s is leaving unique map %s.\n", op->name, exit_ob->map->path);
      if((t = strrchr(exit_ob->map->path,'/'))) {
        t++;
        strcpy(apartment, t);
      } else { /* This "shouldn't" happen. */
        LOG(llevError,"Pathless unique map: '%s'?\n", exit_ob->map->path);
        strcpy(apartment, exit_ob->map->path);
      }
      while((t = strchr(apartment,'_'))) t[0] = '/';
      newpath = normalize_path (apartment, EXIT_PATH(exit_ob));
    } else {
      newpath = normalize_path (exit_ob->map->path, EXIT_PATH(exit_ob));
    }
         } else {
  newpath = normalize_path (exit_ob->map->path, EXIT_PATH(exit_ob));   newpath = normalize_path (exit_ob->map->path, EXIT_PATH(exit_ob));
         }
  } else {   } else {
  if (EXIT_LEVEL (exit_ob) > 0)   if (EXIT_LEVEL (exit_ob) > 0)
    LOG(llevError,"Number Map levels are no more supported\n");   LOG(llevError,"Number Map levels are no longer supported\n");
  return;   return;
  }   }
   } else    } else
  newpath = op->contr->maplevel;   newpath = op->contr->maplevel;
   
   
   /* If no map path has been found yet, just keep the player on the    /* If no map path has been found yet, just keep the player on the
  * map he is on right now   * map he is on right now
  */   */
Line 313
 
Line 332
  return;   return;
     }      }
   
   
   /* Clear the player's count, and reset direction */    /* Clear the player's count, and reset direction */
   op->direction=0;    op->direction=0;
   op->contr->count=0;    op->contr->count=0;
Line 326
 
Line 344
   /* Keep track of the map the player is on right now */    /* Keep track of the map the player is on right now */
   oldmap=op->map;    oldmap=op->map;
   
   
   /* When logging in, the object is already removed.  If that is    /* When logging in, the object is already removed.  If that is
  * not the case, then the following is used */   * not the case, then the following is used */
   if(!removed) {    if(!removed) {
Line 377
 
Line 394
   /* Do any processing to get the map loaded and ready */    /* Do any processing to get the map loaded and ready */
   op->map = ready_map_name(newpath,(unique?MAP_PLAYER_UNIQUE:0));    op->map = ready_map_name(newpath,(unique?MAP_PLAYER_UNIQUE:0));
   
   
   /* Did the load fail for some reason?  If so, put the player back on the    /* Did the load fail for some reason?  If so, put the player back on the
  * map they came from and remove the exit that pointed the player to   * map they came from and remove the exit that pointed the player to
  * the bad map.   * the bad map.


Legend:
line(s) removed in v.1.4 
line(s) changed
 line(s) added in v.1.5

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