My Project
EnvSimServer.h
1 #pragma once
2 #include "IEnvironmentSim.h"
3 #include "GameNetCommon.h"
4 #include <list>
5 
6 namespace ParaEngine
7 {
8  class IGameObject;
9  class CBipedObject;
10  class COPCBiped;
11  class CCharacterTracker;
12  class CNetTime;
13 
14  using namespace std;
19  {
20  public:
21  CEnvSimServer(void);
22  ~CEnvSimServer(void);
23  public:
27  virtual SIMULATOR_TYPE GetSimulatorType(){return SIM_TYPE_SERVER;};
28 
32  virtual void Animate( double dTimeDelta );
33 
42  virtual void CheckLoadPhysics(const D3DXVECTOR3& vCenter, float fRadius);
43 
45  virtual void Release();
46 
51  virtual CNetTime* GetNetTime()
52  {
53  return &m_time;
54  }
55 
63  bool SendNormalUpdate(const string& id, NPL::CBitStream* s);
64  bool SendNormalUpdate(COPCBiped * pOPC, NPL::CBitStream* s);
65 
72  bool OnReceiveNormalUpdate(const string& id, NPL::CBitStream* s);
73 
82  bool SendCharacterUpdate(CBipedObject* pChar, CCharacterTracker* pCharTracker, NPL::CBitStream* s,const char* sIdentifier = NULL);
83 
92  IGameObject* ReceiveCharacterUpdate(NPL::CBitStream* s, bool& bIsDifferentUpdate, const char* sIdentifier = NULL);
93 
99  static bool NetworkMoveCharacter(CBipedObject* pBiped, const D3DXVECTOR3& vDest, float fFacing, float fSpeed, float fVerticalSpeed, bool bForceRun, bool bForceWalk);
100 
101  private:
104  void UpdateGameObjects(double dTimeDelta);
105 
106 
108  list <ActiveTerrain*> m_listActiveTerrain;
111  list <ActiveBiped*> m_listActiveBiped;
112 
114  list <CBipedObject*> m_listVIPBipeds;
115 
119  CNetTime m_time;
120  };
121 
122 }
this is the environment simulator of a standard game world server.
Definition: EnvSimServer.h:18
It tracks a character on the network, such as its last update time, position track, etc.
Definition: GameNetCommon.h:59
Current network simulation time.
Definition: GameNetCommon.h:17
different physics engine has different winding order.
Definition: EventBinding.h:32
virtual SIMULATOR_TYPE GetSimulatorType()
return the current type of simulator.
Definition: EnvSimServer.h:27
this is an interface class for game objects, such as NPC, OPC and players.
Definition: IGameObject.h:15
virtual CNetTime * GetNetTime()
get the net time object
Definition: EnvSimServer.h:51
represent a player from the network.
Definition: OPCBiped.h:10
It can be used to represent biped object(like human, re spawning monsters) in the scene without inher...
Definition: BipedObject.h:60
environment simulator.
Definition: IEnvironmentSim.h:103