Starshatter_Open
Open source Starshatter engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
NetGameServer Class Reference

#include <NetGameServer.h>

Inheritance diagram for NetGameServer:
NetGame SimObserver

List of all members.

Public Member Functions

 NetGameServer ()
virtual ~NetGameServer ()
virtual bool IsClient () const
virtual bool IsServer () const
virtual void ExecFrame ()
virtual void CheckSessions ()
virtual void Send ()
virtual void SendData (NetData *data)
virtual void Respawn (DWORD objid, Ship *spawn)
virtual bool Update (SimObject *obj)
virtual const char * GetObserverName () const
virtual void RouteChatMsg (NetChatMsg &chat_msg)
- Public Member Functions inherited from NetGame
 NetGame ()
virtual ~NetGame ()
virtual bool IsActive () const
virtual DWORD GetNetID () const
virtual DWORD GetObjID () const
virtual void Recv ()
virtual NetPlayerFindPlayerByName (const char *name)
virtual NetPlayerFindPlayerByNetID (DWORD netid)
virtual NetPlayerFindPlayerByObjID (DWORD objid)
virtual ShipFindShipByObjID (DWORD objid)
virtual ShotFindShotByObjID (DWORD objid)
virtual NetPeerGetPeer (NetPlayer *player)
- Public Member Functions inherited from SimObserver
virtual ~SimObserver ()
int operator== (const SimObserver &o) const
virtual void Observe (SimObject *obj)
virtual void Ignore (SimObject *obj)

Protected Member Functions

virtual void DoJoinRequest (NetMsg *msg)
virtual void DoJoinAnnounce (NetMsg *msg)
virtual void DoQuitRequest (NetMsg *msg)
virtual void DoQuitAnnounce (NetMsg *msg)
virtual void DoGameOver (NetMsg *msg)
virtual void DoDisconnect (NetMsg *msg)
virtual void DoObjLoc (NetMsg *msg)
virtual void DoObjDamage (NetMsg *msg)
virtual void DoObjKill (NetMsg *msg)
virtual void DoObjSpawn (NetMsg *msg)
virtual void DoObjHyper (NetMsg *msg)
virtual void DoObjTarget (NetMsg *msg)
virtual void DoObjEmcon (NetMsg *msg)
virtual void DoSysDamage (NetMsg *msg)
virtual void DoSysStatus (NetMsg *msg)
virtual void DoElemRequest (NetMsg *msg)
virtual void DoElemCreate (NetMsg *msg)
virtual void DoShipLaunch (NetMsg *msg)
virtual void DoNavData (NetMsg *msg)
virtual void DoNavDelete (NetMsg *msg)
virtual void DoWepTrigger (NetMsg *msg)
virtual void DoWepRelease (NetMsg *msg)
virtual void DoWepDestroy (NetMsg *msg)
virtual void DoCommMsg (NetMsg *msg)
virtual void DoChatMsg (NetMsg *msg)
virtual void DoSelfDestruct (NetMsg *msg)
virtual NetPlayerFindZombieByObjID (DWORD objid)
virtual void SendDisconnect (NetPlayer *zombie)

Protected Attributes

List< Shipships
List< NetPlayerzombies
- Protected Attributes inherited from NetGame
List< NetPlayerplayers
NetLinklink
DWORD objid
DWORD netid
Shiplocal_player
Text player_name
Text player_pass
Shiptarget
Simsim
bool active
DWORD last_send_time
- Protected Attributes inherited from SimObserver
List< SimObjectobserve_list

Additional Inherited Members

- Public Types inherited from NetGame
enum  { SHIP, SHOT }
- Static Public Member Functions inherited from NetGame
static const char * TYPENAME ()
static NetGameCreate ()
static NetGameGetInstance ()
static bool IsNetGame ()
static bool IsNetGameClient ()
static bool IsNetGameServer ()
static int NumPlayers ()
static DWORD GetNextObjID (int type=SHIP)
- Static Public Member Functions inherited from SimObserver
static const char * TYPENAME ()

Detailed Description

Definition at line 27 of file NetGameServer.h.


Constructor & Destructor Documentation

NetGameServer::NetGameServer ( )

Definition at line 52 of file NetGameServer.cpp.

NetGameServer::~NetGameServer ( )
virtual

Definition at line 84 of file NetGameServer.cpp.


Member Function Documentation

void NetGameServer::CheckSessions ( )
virtual

Definition at line 158 of file NetGameServer.cpp.

void NetGameServer::DoChatMsg ( NetMsg msg)
protectedvirtual

Reimplemented from NetGame.

Definition at line 877 of file NetGameServer.cpp.

void NetGameServer::DoCommMsg ( NetMsg msg)
protectedvirtual

Reimplemented from NetGame.

Definition at line 840 of file NetGameServer.cpp.

void NetGameServer::DoDisconnect ( NetMsg msg)
protectedvirtual

Reimplemented from NetGame.

Definition at line 415 of file NetGameServer.cpp.

void NetGameServer::DoElemCreate ( NetMsg msg)
protectedvirtual

Reimplemented from NetGame.

Definition at line 634 of file NetGameServer.cpp.

void NetGameServer::DoElemRequest ( NetMsg msg)
protectedvirtual

Reimplemented from NetGame.

Definition at line 604 of file NetGameServer.cpp.

void NetGameServer::DoGameOver ( NetMsg msg)
protectedvirtual

Reimplemented from NetGame.

Definition at line 408 of file NetGameServer.cpp.

void NetGameServer::DoJoinAnnounce ( NetMsg msg)
protectedvirtual

Reimplemented from NetGame.

Definition at line 353 of file NetGameServer.cpp.

void NetGameServer::DoJoinRequest ( NetMsg msg)
protectedvirtual

Reimplemented from NetGame.

Definition at line 214 of file NetGameServer.cpp.

void NetGameServer::DoNavData ( NetMsg msg)
protectedvirtual

Reimplemented from NetGame.

Definition at line 730 of file NetGameServer.cpp.

void NetGameServer::DoNavDelete ( NetMsg msg)
protectedvirtual

Reimplemented from NetGame.

Definition at line 767 of file NetGameServer.cpp.

void NetGameServer::DoObjDamage ( NetMsg msg)
protectedvirtual

Reimplemented from NetGame.

Definition at line 443 of file NetGameServer.cpp.

void NetGameServer::DoObjEmcon ( NetMsg msg)
protectedvirtual

Reimplemented from NetGame.

Definition at line 530 of file NetGameServer.cpp.

void NetGameServer::DoObjHyper ( NetMsg msg)
protectedvirtual

Reimplemented from NetGame.

Definition at line 487 of file NetGameServer.cpp.

void NetGameServer::DoObjKill ( NetMsg msg)
protectedvirtual

Reimplemented from NetGame.

Definition at line 450 of file NetGameServer.cpp.

void NetGameServer::DoObjLoc ( NetMsg msg)
protectedvirtual

Reimplemented from NetGame.

Definition at line 422 of file NetGameServer.cpp.

void NetGameServer::DoObjSpawn ( NetMsg msg)
protectedvirtual

Reimplemented from NetGame.

Definition at line 480 of file NetGameServer.cpp.

void NetGameServer::DoObjTarget ( NetMsg msg)
protectedvirtual

Reimplemented from NetGame.

Definition at line 510 of file NetGameServer.cpp.

void NetGameServer::DoQuitAnnounce ( NetMsg msg)
protectedvirtual

Reimplemented from NetGame.

Definition at line 401 of file NetGameServer.cpp.

void NetGameServer::DoQuitRequest ( NetMsg msg)
protectedvirtual

Reimplemented from NetGame.

Definition at line 364 of file NetGameServer.cpp.

void NetGameServer::DoSelfDestruct ( NetMsg msg)
protectedvirtual

Reimplemented from NetGame.

Definition at line 962 of file NetGameServer.cpp.

void NetGameServer::DoShipLaunch ( NetMsg msg)
protectedvirtual

Reimplemented from NetGame.

Definition at line 702 of file NetGameServer.cpp.

void NetGameServer::DoSysDamage ( NetMsg msg)
protectedvirtual

Reimplemented from NetGame.

Definition at line 552 of file NetGameServer.cpp.

void NetGameServer::DoSysStatus ( NetMsg msg)
protectedvirtual

Print("NetGameServer::DoSysStatus - received request for ship '%s' from wrong player %s\n", ship->Name(), player ? player->Name() : "null");

Reimplemented from NetGame.

Definition at line 566 of file NetGameServer.cpp.

void NetGameServer::DoWepDestroy ( NetMsg msg)
protectedvirtual

Reimplemented from NetGame.

Definition at line 835 of file NetGameServer.cpp.

void NetGameServer::DoWepRelease ( NetMsg msg)
protectedvirtual

Reimplemented from NetGame.

Definition at line 813 of file NetGameServer.cpp.

void NetGameServer::DoWepTrigger ( NetMsg msg)
protectedvirtual

Reimplemented from NetGame.

Definition at line 793 of file NetGameServer.cpp.

void NetGameServer::ExecFrame ( )
virtual

Reimplemented from NetGame.

Definition at line 111 of file NetGameServer.cpp.

NetPlayer * NetGameServer::FindZombieByObjID ( DWORD  objid)
protectedvirtual

Definition at line 199 of file NetGameServer.cpp.

const char * NetGameServer::GetObserverName ( ) const
virtual

Reimplemented from SimObserver.

Definition at line 1173 of file NetGameServer.cpp.

virtual bool NetGameServer::IsClient ( ) const
inlinevirtual

Reimplemented from NetGame.

Definition at line 33 of file NetGameServer.h.

virtual bool NetGameServer::IsServer ( ) const
inlinevirtual

Reimplemented from NetGame.

Definition at line 34 of file NetGameServer.h.

void NetGameServer::Respawn ( DWORD  objid,
Ship spawn 
)
virtual

Reimplemented from NetGame.

Definition at line 1181 of file NetGameServer.cpp.

void NetGameServer::RouteChatMsg ( NetChatMsg chat_msg)
virtual

Definition at line 888 of file NetGameServer.cpp.

void NetGameServer::Send ( )
virtual

Reimplemented from NetGame.

Definition at line 1003 of file NetGameServer.cpp.

void NetGameServer::SendData ( NetData data)
virtual

Reimplemented from NetGame.

Definition at line 1108 of file NetGameServer.cpp.

void NetGameServer::SendDisconnect ( NetPlayer zombie)
protectedvirtual

Definition at line 1142 of file NetGameServer.cpp.

bool NetGameServer::Update ( SimObject obj)
virtual

Reimplemented from SimObserver.

Definition at line 1158 of file NetGameServer.cpp.


Member Data Documentation

List<Ship> NetGameServer::ships
protected

Definition at line 83 of file NetGameServer.h.

List<NetPlayer> NetGameServer::zombies
protected

Definition at line 84 of file NetGameServer.h.


The documentation for this class was generated from the following files: