const int NMM_PIECE_HOME = 0x1; // not yet placed
const int NMM_PIECE_BOARD = 0x2; // placed on the board
+const int NMM_SPECTATOR_TEAM = 255; // must be above max teams and equal to or below 255
+
.int nmm_tile_distance;
.entity nmm_tile_piece;
.string nmm_tile_hmill;
for ( e = minigame.minigame_players; e; e = e.list_next )
n++;
if ( n >= 2 )
- return 0;
+ return NMM_SPECTATOR_TEAM;
if ( minigame.minigame_players && minigame.minigame_players.team == 1 )
return 2;
return 1;
float piece_light = 1;
entity e = NULL;
- mypos = pos;
- if ( (active_minigame.minigame_flags&NMM_TURN_TEAM) == 2 )
- mypos_y += player_fontsize_y + ts_y;
- drawfill(mypos,eX*mySize_x+eY*player_fontsize_y,'1 1 1',0.5,DRAWFLAG_ADDITIVE);
- mypos_y += player_fontsize_y;
- drawfill(mypos,eX*mySize_x+eY*piece_sz_y,'1 1 1',0.25,DRAWFLAG_ADDITIVE);
+ if(minigame_self.team != NMM_SPECTATOR_TEAM)
+ {
+ mypos = pos;
+ if ( (active_minigame.minigame_flags&NMM_TURN_TEAM) == 2 )
+ mypos_y += player_fontsize_y + ts_y;
+ drawfill(mypos,eX*mySize_x+eY*player_fontsize_y,'1 1 1',0.5,DRAWFLAG_ADDITIVE);
+ mypos_y += player_fontsize_y;
+ drawfill(mypos,eX*mySize_x+eY*piece_sz_y,'1 1 1',0.25,DRAWFLAG_ADDITIVE);
+ }
FOREACH_MINIGAME_ENTITY(e)
{
- if ( e.classname == "minigame_player" )
+ if ( e.classname == "minigame_player" && e.team != NMM_SPECTATOR_TEAM )
{
mypos = pos;
if ( e.team == 2 )
string nmm_turn_to_string(int turnflags)
{
+ if( minigame_self.team == NMM_SPECTATOR_TEAM )
+ return _("You are spectating");
+
if ( turnflags & NMM_TURN_WIN )
{
if ( (turnflags&NMM_TURN_TEAM) != minigame_self.team )