Re: [BUG] Bug in circle30bpl12 ?

From: Andy Hubbard (hub@LEICESTER.AC.UK)
Date: 12/01/97


> while my players complained me about slow hit and mana recovering, I
> wandered in file limits.c about raising this, looking to hit_gain(),
> mana_gain() ... I think there 's a small bug there :
>
>         ... previous=calculation of gain...
>
>     /* Position calculations    */
>     switch (GET_POS(ch)) {
>     case POS_SLEEPING:
>       gain += (gain >> 1);      /* Divide by 2 */
>       break;
>     case POS_RESTING:
>       gain += (gain >> 2);      /* Divide by 4 */
>       break;
>     case POS_SITTING:
>       gain += (gain >> 3);      /* Divide by 8 */
>       break;
>     }

Ouch :)

I think you will find that dividing by 8 will produce a smaller
number than dividing by 2
ie.  80 / 8 = 10, whereas, 80 / 2 = 40  :)
So, when sleeping (using above complex maths) you gain 40 blah
while upon sitting, you gain 10 blah ...
Unless of course your sleeping on your head

Andy

http://winnt.cmht.le.ac.uk/dreamscapes.htm
telnet to dreamscapes on, winnt.cmht.le.ac.uk 4000


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/08/00 PST