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

Some bugs in 0.92.6/0.92.7



Hi,

I have found a few bugs in crossfire-0.92.7.

First some system information:
	PC Compatible with Linux 2.0.21
	X11R6.1 (XFree86 3.1.2G)
	gcc-2.7.2.1
	libc-4.7.6

1. tempnam() is declared in libc-4.7.6
   I had to remove the declaration from include/includes.h to compile
   crossfire successfully. Maybe it's a problem with my installation of
   gcc+libc.

------------------------------------------------------------------------------
making all in ./common...
make[1]: Entering directory `/mnt/src/crossfire-0.92.7/common'
gcc -g -DDEBUG -O    -I../include -I/usr/local/include  -I/usr/X11R6/include  -Dlinux -D__i386__ -D_POSIX_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -DX_LOCALE -DLONGJUMP  -DXpm_Pix        -DSOUND_EFFECTS -DERIC_SERVER=0 -DFUNCPROTO=15 -DNARROWPROTO  -DFONTDIR=\"/usr/local/games/crossfire/fonts\" -DFONTNAME=\"crossfire\"          -DLIBDIR=\"/usr/local/games/crossfire/lib\"   -c arch.c -o arch.o
In file included from ../include/global.h:35,
                 from arch.c:28:
../include/includes.h:70: conflicting types for `tempnam'
/usr/include/stdio.h:152: previous declaration of `tempnam'
make[1]: *** [arch.o] Error 1
make[1]: Leaving directory `/mnt/src/crossfire-0.92.7/common'
making all in ./doc...
[Compilation continues. Why that? Gives only more errors like this one.]
------------------------------------------------------------------------------


2. The buffer in server/input.c/examine() is too small.

-------patch-for-0.92.7-------------------------------------------------------
*** input.c	Wed Oct 16 19:13:45 1996
--- input.c-new	Wed Oct 16 19:10:49 1996
***************
*** 338,348 ****
  
    return buf;
  }
  
  void examine(object *op, object *tmp) {
!   char buf[MAX_BUF];
  
    if (tmp == NULL || tmp->type == CLOSE_CON)
      return;
  /* Eneq(csd.uu.se): If NO_PRETEXT is defined we should only print the name. */
    if (QUERY_FLAG(tmp, FLAG_NO_PRETEXT))
--- 338,348 ----
  
    return buf;
  }
  
  void examine(object *op, object *tmp) {
!   char buf[VERY_BIG_BUF];
  
    if (tmp == NULL || tmp->type == CLOSE_CON)
      return;
  /* Eneq(csd.uu.se): If NO_PRETEXT is defined we should only print the name. */
    if (QUERY_FLAG(tmp, FLAG_NO_PRETEXT))
------------------------------------------------------------------------------

 Example item to demonstrate this bug:
------------------------------------------------------------------------------
arch CSword
title of God
slaying undead,demon
face CSword.112
speed_left -0.488908
attacktype 278784
state 12
magic 20
identified 1
been_applied 1
no_skill_ident 1
end
------------------------------------------------------------------------------


3. Check for PATH_NULL (god intervention, learn spells) does not work.

--------patch-for-0.92.6------------------------------------------------------
*** gods.c	Tue Sep  3 09:50:36 1996
--- gods.c-1	Tue Sep 24 12:25:21 1996
***************
*** 290,300 ****
      * has PATH_NULL.  
      */
  
      if(!(Gods[godnr].path_denied&spells[spell].path) 
          &&!(Gods[godnr].path_repelled&spells[spell].path) 
! 	&&!(spells[spell].path&PATH_NULL)
  	&&spells[spell].level<=level
  	&&!check_spell_known(op,spell)) { 
  
  #ifdef SOUND_EFFECTS 
      	play_sound_player_only(op->contr, SOUND_LEARN_SPELL); 
--- 290,300 ----
      * has PATH_NULL.  
      */
  
      if(!(Gods[godnr].path_denied&spells[spell].path) 
          &&!(Gods[godnr].path_repelled&spells[spell].path) 
! 	&&!(spells[spell].path==PATH_NULL)
  	&&spells[spell].level<=level
  	&&!check_spell_known(op,spell)) { 
  
  #ifdef SOUND_EFFECTS 
      	play_sound_player_only(op->contr, SOUND_LEARN_SPELL); 
------------------------------------------------------------------------------


4. other problems with learning spells through god intervention
   Maybe these problems disappear when only priest spells can be learned
   through god intervention. It was possible to learn all spells including
   "invulnerability", "regenerate spellpoints" and "shockwave".


5. When using Xpm, directors below the floor are invisible, but if some object
   is on the floor, they become visible.

-------sample-map-------------------------------------------------------------
arch map
name director
msg
Creator: Jan Echternach
Email: jan.echternach@informatik.uni-rostock.de
Date: Thu Oct  3 11:25:38 1996
endmsg
x 6
y 6
end
arch oakdoor
slaying /city/city
hp 13
sp 13
x 1
y 1
end
arch director_1
x 3
y 2
end
arch cobblestones2
x 3
y 2
end
arch helmet
x 3
y 2
end
arch director_1
x 3
y 3
end
arch cobblestones2
x 3
y 3
end
-------------------------------------------------------------------------------


6. spell "regeneration": overflow possible (i.e. regeneration -116)


7. When attacking a castle guard (and probably other monsters as well), a
   weapon that slays something (i.e. stake +1) does more damage than a normal
   weapon (i.e. sword +4).

--
jan.echternach@informatik.uni-rostock.de