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

Repost of diffs



Frank, I rediffed the patches I sent out yesterday which didn't make it into
the new release against the .87.8 code, and am resending them out.
These fix the following bugs.
Summoned monsters can no longer go off the map (this would coredump the game)
You can always control a summoned monster.
Loading a player now restores the current active spell and shoottype.
A wizard summoning a player or teleporting no longer says ... enters (null)
instead is says ... teleports to level ##.

---------------------------cut here-------------------------------
*** spells.c.old	Thu Sep 24 17:27:23 1992
--- spells.c	Thu Sep 24 17:39:53 1992
***************
*** 50,56 ****
      fprintf(stderr,"Error, unknown spell: %d\n",type);
      return;
    }
!   if(!IS_WIZ(op)&&op->stats.sp<s->sp&&!(type==SP_GOLEM&&op->contr->golem!=NULL)) {
      draw_info(op,"You don't have enough spellpoints.");
      op->contr->count_left=0;
      return;
--- 50,57 ----
      fprintf(stderr,"Error, unknown spell: %d\n",type);
      return;
    }
!   if(!IS_WIZ(op)&&op->stats.sp<s->sp &&
!      !(IS_SUMMON_SPELL(type)&&op->contr->golem!=NULL)) {
      draw_info(op,"You don't have enough spellpoints.");
      op->contr->count_left=0;
      return;
***************
*** 507,513 ****
      free_object(op);
      return;
    }
!   if(!move_ob(op,op->direction)) {
      update_object(op);
      hit_map(op,op->direction,AT_PHYSICAL);
      for(tmp=get_map_ob(op->map,op->x+freearr_x[op->direction],
--- 508,516 ----
      free_object(op);
      return;
    }
!   if(!move_ob(op,op->direction)&&
!      !out_of_map(op->map,op->x+freearr_x[op->direction],
!                  op->y+freearr_y[op->direction])) {
      update_object(op);
      hit_map(op,op->direction,AT_PHYSICAL);
      for(tmp=get_map_ob(op->map,op->x+freearr_x[op->direction],
*** spells.h.old	Thu Sep 24 17:37:53 1992
--- spells.h	Thu Sep 24 17:40:08 1992
***************
*** 63,65 ****
--- 63,67 ----
  "fear",				4,10,
  "poison cloud",			2, 5
  };
+ 
+ #define IS_SUMMON_SPELL(spell) ((spell) > SP_BOMB && (spell) < SP_D_DOOR)
*** login.c.old	Thu Sep 24 20:03:44 1992
--- login.c	Thu Sep 24 20:05:25 1992
***************
*** 172,177 ****
--- 172,181 ----
          sscanf(bufall,"%s %d\n",buf,&value);
          if (!strcmp(buf,"gen_hp"))
            op->contr->gen_hp=value;
+         if (!strcmp(buf,"spell"))
+           op->contr->chosen_spell=value;
+         if (!strcmp(buf,"shoottype"))
+           op->contr->shoottype=value;
          if (!strcmp(buf,"gen_sp"))
            op->contr->gen_sp=value;
          if (!strcmp(buf,"listening"))
*** main.c.old	Thu Sep 24 17:14:58 1992
--- main.c	Thu Sep 24 17:27:52 1992
***************
*** 659,665 ****
      new_level=op->map->level+1;
    op->direction=0,op->contr->count=0,op->contr->count_left=0;
    if(exit_ob!=NULL) {
!     sprintf(buf,"%s enters %s.",op->name,exit_ob->name);
      info_all(buf,3);
      info_flush();
    }
--- 659,668 ----
      new_level=op->map->level+1;
    op->direction=0,op->contr->count=0,op->contr->count_left=0;
    if(exit_ob!=NULL) {
!     if(exit_ob->name)
!       sprintf(buf,"%s enters %s.",op->name,exit_ob->name);
!     else
!       sprintf(buf, "%s teleports to level %d.", op->name, new_level);
      info_all(buf,3);
      info_flush();
    }
------------------------------------------cut here-------------------
-------------------------------------------------------------------------
Practice random kindness and senseless acts of beauty --Anonymous
Argue for your limitations and sure enough they're yours --Richard Bach
Isn't humanity egocentric? Whenever we talk, we say "Here's my two cents
  worth," but we only offer "a penny for your thoughts." --ariel@cs.ucla.edu

Moonchilde/Amythyst/JT Traub ---           jtraub@cmu.edu