[CF-Devel] become_follower patch

crossfire-devel at archives.real-time.com crossfire-devel at archives.real-time.com
Sun Jan 25 13:28:53 CST 2004


>
     
        Basically looks fine.
     
     >
     
     
     >
     
        Only minor quibble is there is no need to check the flag status before
     
     >
     
        setting 
     
     >
     
      it.  EG, instead of:
     
     >
     
     
     >
     
              if (!QUERY_FLAG(skop, FLAG_APPLIED))
     
     >
     
                      SET_FLAG(skop,FLAG_APPLIED);
     
     >
     
     
     >
     
      this is equivalant:
     
     >
     
     
     >
     
      	SET_FLAG(skop,FLAG_APPLIED);
     
     >
     
     
     
heh... that was my first thought, but then i looked at the rest of the function
code at the point where toggles the flag to unapplied to remove the previous
god, and since it queries the flag first i thought it was needed to do here too.
I have to say i just understood all the way flags work 2 days ago and i will
need some time to get used to this :)

I resend the patch and i also changed the condition of the first if who queries
the flag so it uses the already saved variable instead of calling again
QUERY_FLAG that is already done for the variable.

Hope it's ok this way :)
See you .
Karla.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: become_follower.diff
Type: application/octet-stream
Size: 1604 bytes
Desc: not available
Url : 
     
     http://shadowknight.real-time.com/pipermail/crossfire/attachments/20040125/4f9e5003/become_follower.obj
     
     
-------------- next part --------------
_______________________________________________
crossfire-devel mailing list
     
     crossfire-devel at lists.real-time.com
     
     
     https://mailman.real-time.com/mailman/listinfo/crossfire-devel
     
     
    


More information about the crossfire mailing list