On Sat, 6 Feb 1999 12:42:16 Richard Glover wrote:
>Having STATE_x is better for more than just MOUNTED. You should also look
>at putting STATE_SLEEPING, STATE_STUNNED, etc for these. Since you can be
>sitting and alseep, they should be 2 different things. You'll just need to
>add in some macros and check throughout the code for checked against GET_POS
>since they use <, >, or = and make the appropriate changes.
>
I just started working on a change over and two things
have occurred to me - one, flying players (AFF_FLYING)
can decidedly be either on the ground (STATE_STANDING)
or in the air (STATE_FLYING), which opens up an
interesting can of worms... and two (and FAR more
significant), by redefining the POS_x values to
bitvector form, you don't actually need to change much
of the existing code. Since (1 << 5) is still a
regular number (16), for example:
assume GET_POS(ch) = POS_RESTING
old:
if (GET_POS(ch) > POS_SLEEPING) { blah; } ==>
if (5 > 4) { blah; }
new:
if (GET_POS(ch) > POS_SLEEPING) { blah; } ==>
if ((1 << 5) > (1 << 4)) { blah; } ==>
if (16 > 8) { blah; }
so all the existing checks should still work.
Yes, some changes are still necessary, yes, but it
doesn't totally break everything.
Angelfire for your free web-based e-mail. http://www.angelfire.com
+------------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
| http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
+------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST