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

More patches



Frank, here are a few more bug fixes for you.
The first set patches some small problems in the archetypes file.
It raises the cost of dragon mail (from 1000 to 15000)
It makes boulders no longer block sight.
It makes Skullcrusher have a value (currently 30000)
The second set of patches fixes some more problems with file pointers and
using them when they might not be there.  I also reverse the previous patch
I gave on login.c and redo the patch where I should have done it to begin
with (in close_and_delete).

Enjoy
--JT
-------------------------------cut here---------------------
*** ../crossfire/archetypes	Mon Sep 21 11:20:24 1992
--- archetypes	Wed Sep 23 15:40:35 1992
***************
*** 908,914 ****
  material 64
  weight 1000000
  no_pass 1
- blocksview 1
  can_roll 1
  no_pick 1
  editable 1
--- 908,913 ----
***************
*** 3867,3872 ****
--- 3866,3872 ----
  last_sp 11
  type 15
  weight 32000
+ value 30000
  magic 3
  dam 15
  material 18
***************
*** 3956,3962 ****
  last_sp 10
  ac 7
  weight 90000
! value 1000
  protected 4
  end
  Object robe
--- 3956,3962 ----
  last_sp 10
  ac 7
  weight 90000
! value 15000
  protected 4
  end
  Object robe
*** login.c.old	Wed Sep 23 14:07:16 1992
--- login.c	Wed Sep 23 14:11:46 1992
***************
*** 81,123 ****
    }
    sprintf(filename,"%s/%s.pl",PLAYERDIR,op->name);
    fp=fopen(filename, "w");
!   fprintf(fp,"%s\n",op->contr->password);
!   fprintf(fp,"gen_hp %d\n",op->contr->gen_hp);
!   fprintf(fp,"gen_sp %d\n",op->contr->gen_sp);
!   fprintf(fp,"listening %d\n",op->contr->listening);
!   fprintf(fp,"spell %d\n",op->contr->chosen_spell);
!   fprintf(fp,"shoottype %d\n",op->contr->shoottype);
!   fprintf(fp,"lev_array %d\n",op->contr->last_level);
!   fprintf(fp,"berzerk %d\n",op->contr->berzerk);
!   fprintf(fp,"peaceful %d\n",op->contr->peaceful);
!   fprintf(fp,"scroll %d\n",op->contr->scroll);
!   for(i=0;i<NROFPUSHKEYS;i++)
!     if(op->contr->pushstring[i][0]!='\0')
!       fprintf(fp,"pushkey %s %s\n",
!               keycodetochar(op,op->contr->pushkeys[i]),
!               op->contr->pushstring[i]);
!   fprintf(fp,"lev_array %d\n",op->level>10?10:op->level);
!   for(i=1;i<=op->contr->last_level&&i<=10;i++) {
!     fprintf(fp,"%d\n",op->contr->levhp[i]);
!     fprintf(fp,"%d\n",op->contr->levsp[i]);
!   }
!   fprintf(fp,"spell_array %d\n",op->contr->nrofknownspells);
!   for(i=0;i<op->contr->nrofknownspells;i++)
!     fprintf(fp,"%d\n",op->contr->known_spells[i]);
!   fprintf(fp,"endplst\n");
!   save_object(fp,op);
!   op->contr->freeze_inv=1;
!   if(flag)
!     for(tmp=op->inv;tmp!=NULL;tmp=tmp->below)
!       save_object(fp,tmp);
!   else
!     while ((tmp=op->inv)!=NULL) {
!       if(!IS_UNPAID(tmp))
!         save_object(fp,tmp);
!       remove_ob(tmp);
!       free_object(tmp);
      }
!   fclose(fp); 
    op->contr->freeze_inv=0;
    if(!flag)
      draw_all_inventory(op);
--- 81,125 ----
    }
    sprintf(filename,"%s/%s.pl",PLAYERDIR,op->name);
    fp=fopen(filename, "w");
!   if(fp) {
!     fprintf(fp,"%s\n",op->contr->password);
!     fprintf(fp,"gen_hp %d\n",op->contr->gen_hp);
!     fprintf(fp,"gen_sp %d\n",op->contr->gen_sp);
!     fprintf(fp,"listening %d\n",op->contr->listening);
!     fprintf(fp,"spell %d\n",op->contr->chosen_spell);
!     fprintf(fp,"shoottype %d\n",op->contr->shoottype);
!     fprintf(fp,"lev_array %d\n",op->contr->last_level);
!     fprintf(fp,"berzerk %d\n",op->contr->berzerk);
!     fprintf(fp,"peaceful %d\n",op->contr->peaceful);
!     fprintf(fp,"scroll %d\n",op->contr->scroll);
!     for(i=0;i<NROFPUSHKEYS;i++)
!       if(op->contr->pushstring[i][0]!='\0')
!         fprintf(fp,"pushkey %s %s\n",
!                 keycodetochar(op,op->contr->pushkeys[i]),
!                 op->contr->pushstring[i]);
!     fprintf(fp,"lev_array %d\n",op->level>10?10:op->level);
!     for(i=1;i<=op->contr->last_level&&i<=10;i++) {
!       fprintf(fp,"%d\n",op->contr->levhp[i]);
!       fprintf(fp,"%d\n",op->contr->levsp[i]);
      }
!     fprintf(fp,"spell_array %d\n",op->contr->nrofknownspells);
!     for(i=0;i<op->contr->nrofknownspells;i++)
!       fprintf(fp,"%d\n",op->contr->known_spells[i]);
!     fprintf(fp,"endplst\n");
!     save_object(fp,op);
!     op->contr->freeze_inv=1;
!     if(flag)
!       for(tmp=op->inv;tmp!=NULL;tmp=tmp->below)
!         save_object(fp,tmp);
!     else
!       while ((tmp=op->inv)!=NULL) {
!         if(!IS_UNPAID(tmp))
!           save_object(fp,tmp);
!         remove_ob(tmp);
!         free_object(tmp);
!       }
!     fclose(fp); 
!   }
    op->contr->freeze_inv=0;
    if(!flag)
      draw_all_inventory(op);
***************
*** 263,270 ****
        }
      }
    }
!   if(fp)
!     close_and_delete(fp); 
    op->contr->last_value= -1;
    draw_stats(op);
    return;
--- 265,271 ----
        }
      }
    }
!   close_and_delete(fp); 
    op->contr->last_value= -1;
    draw_stats(op);
    return;
*** map.c.old	Wed Sep 23 14:11:25 1992
--- map.c	Wed Sep 23 14:11:28 1992
***************
*** 166,172 ****
  
  void close_and_delete(FILE *fp) {
    char buf[MAX_BUF];
!   fclose(fp);
    if(!delete_last_file)
      return;
    delete_last_file=0;
--- 166,173 ----
  
  void close_and_delete(FILE *fp) {
    char buf[MAX_BUF];
!   if(fp)
!     fclose(fp);
    if(!delete_last_file)
      return;
    delete_last_file=0;
-------------------------------------------------------------------------
Practice random kindness and senseless acts of beauty --Anonymous
Argue for your limitations and sure enough they're yours --Richard Bach

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