components/prboom/wi_stuff.c
// ====================================================================
// WI_fragSum
// Purpose: Calculate frags for this player based on the current totals
//          of all the other players.  Subtract self-frags.
// Args:    playernum -- the player to be calculated
// Returns: the total frags for this player
//
WI_fragSum
Purpose: Calculate frags for this player based on the current totals
of all the other players.  Subtract self-frags.
Args:    playernum -- the player to be calculated
Returns: the total frags for this player
WI_fragSum Purpose : Calculate frags for this player based on the current totals of all the other players . Subtract self - frags . Args : playernum -- the player to be calculated Returns : the total frags for this player
int WI_fragSum(int playernum)
{
  int   i;
  int   frags = 0;
  for (i=0 ; i<MAXPLAYERS ; i++)
  {
    if (playeringame[i]  
       && i!=playernum) 
    {
      frags += plrs[playernum].frags[i];
    }
  }
  frags -= plrs[playernum].frags[playernum];
  return frags;
}
int WI_fragSum ( int playernum ) { int i ; int frags = 0 ; for ( i = 0 ; i < MAXPLAYERS ; i ++ ) { if ( playeringame [ i ] && i != playernum ) { frags += plrs [ playernum ] . frags [ i ] ; } } frags -= plrs [ playernum ] . frags [ playernum ] ; return frags ; }
WI_fragSum
Purpose: Calculate frags for this player based on the current totals
of all the other players.
WI_fragSum Purpose : Calculate frags for this player based on the current totals of all the other players .
// is this player playing? // and it's not the player we're calculating // JDC hack - negative frags.