Re: [BUG] Bug in circle30bpl12 ?

From: Rasdan (rasdan@PEAK.ORG)
Date: 12/01/97


>        ... 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;
>    }

You misinterpret this fragment of code. Notice it says:
gain += <whatever>
This means that gain is INCREMENTED by gain/2, gain/4, gain/8,
etc.
Therefore, standing gains no modifier, and if you are standing,
then gain is just gain, nothing else.

Rasdan

                                  /   \
        _                 )      ((   ))     (
       (@)               /|\      ))_((     /|\                 _
       |-|`\            / | \    (/\|/\)   / | \               (@)
       | | ------------/--|-voV---\`|'/--Vov-|--\--------------|-|
       |-|                  '^`   (o o)  '^`                   | |
       | |  James C. Thomas Jr.   `\Y/'  Founder of Finality   |-|
       |-|                 rasdan@finality.com                 | |
       | |                  finality.com 4000                  |-|
       |_|_____________________________________________________| |
       (@)       l   /\ /         ( (       \ /\   l         `\|-|
                 l /   V           \ \       V   \ l           (@)
                 l/                _) )_          \I
                                   `\ /'
                                     `


     +------------------------------------------------------------+
     | 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