group checking macro

Login to reply  Page: « < 1 of 1 > »
12 Feb 2010 - 04:282333
group checking macro
I am trying to write a macro that will check if two people are in the same group together.
It shouldn't care who the leader of the group is, or even if one of the two people is the
leader.

It doesn't seem to be working correctly though. Can someone see an error of mine?

#define GROUPED(x, y)   ((x)->master == (y) || (y)->master == (x) || (x)->master == (y)->master) \
                     && (AFF_FLAGGED((x), AFF_GROUP) && AFF_FLAGGED((y), AFF_GROUP))

The following situation is where it doesn't work:

I am player A.
I am the leader of the group.
Player B is following me; we are both grouped.

But GROUPED(B, A) is evaluating to false apparently.

Thanks!


__________________
The Augmented Dimension 2.0
mud.themudhost.net port 5000

The Hidden Grotto
(Currently being patched up from Circle 3.0 to tba3.62)
Old version: a-d.codewarp.org 8229
Progress: http://a-d.codewarp.org/~schlittk/grotto_changelog.txt
12 Feb 2010 - 04:382334
Crisis resolved.

The error lied elsewhere.


__________________
The Augmented Dimension 2.0
mud.themudhost.net port 5000

The Hidden Grotto
(Currently being patched up from Circle 3.0 to tba3.62)
Old version: a-d.codewarp.org 8229
Progress: http://a-d.codewarp.org/~schlittk/grotto_changelog.txt
Login to reply  Page: « < 1 of 1 > »