drawpic_aspect_skin(pos, "keepawayball_carrying", vec2(mySize.x, mySize.y), '1 1 1', panel_fg_alpha * tkaball_alpha * f, DRAWFLAG_NORMAL);
else if(stat_items & TKA_BALL_TAKEN_RED)
drawpic_aspect_skin(pos, "tka_taken_red", vec2(mySize.x, mySize.y), '1 1 1', panel_fg_alpha * tkaball_alpha * f, DRAWFLAG_NORMAL);
- else if(stat_items & TKA_BALL_TAKEN_RED)
+ else if(stat_items & TKA_BALL_TAKEN_BLUE)
drawpic_aspect_skin(pos, "tka_taken_blue", vec2(mySize.x, mySize.y), '1 1 1', panel_fg_alpha * tkaball_alpha * f, DRAWFLAG_NORMAL);
- else if(stat_items & TKA_BALL_TAKEN_RED)
+ else if(stat_items & TKA_BALL_TAKEN_YELLOW)
drawpic_aspect_skin(pos, "tka_taken_yellow", vec2(mySize.x, mySize.y), '1 1 1', panel_fg_alpha * tkaball_alpha * f, DRAWFLAG_NORMAL);
- else if(stat_items & TKA_BALL_TAKEN_RED)
+ else if(stat_items & TKA_BALL_TAKEN_PINK)
drawpic_aspect_skin(pos, "tka_taken_pink", vec2(mySize.x, mySize.y), '1 1 1', panel_fg_alpha * tkaball_alpha * f, DRAWFLAG_NORMAL);
}
entity player = M_ARGV(0, entity);
// clear the item used for the ball in keepaway
- STAT(TKA_BALLSTATUS, player) &= ~(TKA_BALL_TAKEN_RED | TKA_BALL_TAKEN_BLUE | TKA_BALL_TAKEN_YELLOW | TKA_BALL_TAKEN_PINK | TKA_BALL_CARRYING | TKA_BALL_DROPPED);
+ STAT(TKA_BALLSTATUS, player) = 0;
// if the player has the ball, make sure they have the item for it (Used for HUD primarily)
if(player.ballcarried)
ENDCLASS(TeamKeepaway)
REGISTER_GAMETYPE(TEAMKEEPAWAY, NEW(TeamKeepaway));
-const int TKA_BALL_TAKEN_RED = 1;
-const int TKA_BALL_TAKEN_BLUE = 2;
-const int TKA_BALL_TAKEN_YELLOW = 3;
-const int TKA_BALL_TAKEN_PINK = 4;
-const int TKA_BALL_CARRYING = 8;
-const int TKA_BALL_DROPPED = 12;
+const int TKA_BALL_TAKEN_RED = BIT(0);
+const int TKA_BALL_TAKEN_BLUE = BIT(1);
+const int TKA_BALL_TAKEN_YELLOW = BIT(2);
+const int TKA_BALL_TAKEN_PINK = BIT(3);
+const int TKA_BALL_CARRYING = BIT(4);
+const int TKA_BALL_DROPPED = BIT(5);