[CF List] problem with some diseases

Mark Wedel mwedel at sonic.net
Mon Jul 8 23:28:56 CDT 2002


  I've fixed the problem, now committed into the CVS tree:

server/disease.c: Fix propogation of diseases with negative damage (these
    do a percent of the creatures damage).  The new disease was getting
    a damage rating of 1 in all cases because we were passing a negative
    value to random_roll for the top end of the range.
MSW 2002-07-08


  This was sort of an odd bug - it was introduced when garbled redid the code to 
use random_roll so luck had a bigger part.  That particular piece of code was 
non obvious that damage could be negative.  Apparantly, the mod (%) operator 
still worked (according to my very old C book, result is machine dependent if 
either of the options to % are negative).

  Simple fix.  Thanks for the info provided - it made finding the bug very easy.



    
    


More information about the crossfire mailing list