Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

clientconnsrvr.h

Go to the documentation of this file.
00001 // ----------------------------------------------------------------------- //
00002 //
00003 // MODULE  : clientconnsrvr.h
00004 //
00005 // PURPOSE : CClientConnSrvr object class - Definition
00006 //
00007 // CREATED : 02/11/01
00008 //
00009 // (c) 2001 LithTech, Inc.  All Rights Reserved
00010 //
00011 // ----------------------------------------------------------------------- //
00012 
00013 #ifndef __CLIENT_CONN_SRVR_H__
00014 #define __CLIENT_CONN_SRVR_H__
00015 
00016 // Shared includes
00017 #include "shared_types.h"
00018 
00019 // Engine includes
00020 #include <ltengineobjects.h>
00021 #include <autoview/autoview.h>
00022 
00024 class CPlayerSrvr;
00025 
00027 class CClientConnSrvr : public BaseClass
00028 {
00029 public:
00030     // Construction / destruction
00031     CClientConnSrvr();
00032     virtual ~CClientConnSrvr();
00033 
00034     distr_class(CClientConnSrvr);
00035 
00036     uint32      EngineMessageFn(uint32 messageID, void *pData, float fData);
00037     uint32      ObjectMessageFn(HOBJECT hSender, uint32 messageID, HMESSAGEREAD hRead);
00038 
00039     // Called when client updates the associated values
00040     virtual void    RemotePositionUpdate(LTVector3f& newPosition);
00041     virtual void    RemoteRotationUpdate(LTOrientation& newOrientation);
00042     virtual void    RemoteVelocityUpdate(LTVector3f& newVelocity);
00043     virtual void    RemoteAngularVelocityUpdate(LTVector3f& newAngVelocity);
00044 
00045     void            SetClient(HCLIENT hClient) { m_hClient = hClient; };
00046     //void          OnMessage(uint8 messageID, ILTMessage* pMessage);
00047     void            OnClientMessage(uint8 messageID, ILTMessage* pMessage);
00048     
00049   protected:
00050     // EngineMessageFn handlers
00051 
00052     uint32          PreCreate(void *pData, float fData);
00053     void            ObjectCreated();
00054     void            Update();
00055 
00056     void            GetForceUpdateObjects(ForceUpdate* pForceUpdate);
00057     
00058     // Game defined methods
00059 
00060     BaseClass*      AddPlayer();
00061     void            FirstUpdate();
00062     void            CallbackPlayers(const uint32& nOldVal);
00063     
00064         
00065 
00066     // Members 
00067     bool            m_bFirstUpdate;
00068 
00069     HCLIENT         m_hClient;      // The client associated with this object
00070 
00071     CPlayerSrvr*    m_pPlayers[MAX_CLIENT_PLAYERS];
00072 
00073     distr_callback_fn(CClientConnSrvr, uint32, m_nPlayers, CallbackPlayers);
00074     distr_uint32_callback(m_nPlayers,   AVITEM_REG, 10, 0);
00075 
00076     distr_uint32(m_nClientID,                   AVITEM_REG, 11, 0);
00077 };
00078 
00079 
00080 #endif  // __CLIENT_CONN_SRVR_H__

Generated on Mon Mar 4 08:42:23 2002 for Aria by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002