1 //////////////////////////////////////////////////////////////////////
5 // Written by Duncan McCreanor, started February 2003.
6 // duncan.mccreanor@airservicesaustralia.com
8 // Copyright (C) 2003 Airservices Australia
9 // Copyright (C) 2005 Oliver Schroeder
11 // This program is free software; you can redistribute it and/or
12 // modify it under the terms of the GNU General Public License as
13 // published by the Free Software Foundation; either version 2 of the
14 // License, or (at your option) any later version.
16 // This program is distributed in the hope that it will be useful, but
17 // WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 // General Public License for more details.
21 // You should have received a copy of the GNU General Public License
22 // along with this program; if not, write to the Free Software
23 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27 //////////////////////////////////////////////////////////////////////
29 #ifndef MULTIPLAYMGR_H
30 #define MULTIPLAYMGR_H
32 #define MULTIPLAYTXMGR_HID "$Id$"
34 #include "mpplayer.hxx"
35 #include "mpmessages.hxx"
46 #include <simgear/compiler.h>
47 #include <plib/netSocket.h>
48 #include <Main/globals.hxx>
50 // Maximum number of players that can exist at any time
51 // FIXME: use a list<mplayer> instead
52 #define MAX_PLAYERS 10
62 void SendMyPosition (const sgQuat PlayerOrientation,
63 const sgdVec3 PlayerPosition);
64 void SendTextMessage (const string &sMsgText) const;
66 void ProcessData(void);
67 void ProcessPosMsg ( const char *Msg, netAddress & SenderAddress );
68 void ProcessChatMsg ( const char *Msg, netAddress & SenderAddress );
71 typedef vector<MPPlayer*> t_MPClientList;
72 typedef t_MPClientList::iterator t_MPClientListIterator;
73 MPPlayer* m_LocalPlayer;
74 netSocket* m_DataSocket;
78 t_MPClientList m_MPClientList;