STeamMsg.hxx

00001 /*
00002 ** TowBowlTactics, a turn-based strategy football game.
00003 ** 
00004 ** Copyright (C) 2007-2010 The TBT Team.
00005 ** 
00006 ** This program is free software; you can redistribute it and/or
00007 ** modify it under the terms of the GNU General Public License
00008 ** as published by the Free Software Foundation; either version 2
00009 ** of the License, or (at your option) any later version.
00010 ** 
00011 ** The complete GNU General Public Licence Notice can be found as the
00012 ** `NOTICE' file in the root directory.
00013 ** 
00014 ** The TBT Team consists of people listed in the `AUTHORS' file.
00015 */
00016 
00017 #include "SRules.hh"
00018 
00019 inline STeam* STeamMsg::getTeam(int token, int team_id)
00020 {
00021   if (team_id < 0 || team_id > 1 || t_[team_id] == NULL)
00022     {
00023       LOG3("Token `%1' is addressed to non-existent team `%2'.)",
00024           r_->stringifyToken(token), team_id);
00025       r_->sendIllegal(token, team_id, ERR_UNREADABLE);
00026       return NULL;
00027     }
00028   return t_[team_id];
00029 }
Generated on Mon Apr 5 21:17:13 2010 for Stechec/TBT by  doxygen 1.6.3