My Project
EnvSimClient.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  using namespace std;
15  {
16  public:
17  CEnvSimClient(void);
18  ~CEnvSimClient(void);
19  public:
23  virtual SIMULATOR_TYPE GetSimulatorType(){return SIM_TYPE_CLIENT;};
24 
28  virtual void Animate( double dTimeDelta );
29 
38  virtual void CheckLoadPhysics(const D3DXVECTOR3& vCenter, float fRadius);
39 
41  virtual void Release();
42 
47  virtual CNetTime* GetNetTime()
48  {
49  return &m_time;
50  }
51 
59  bool SendNormalUpdate(const string& id, NPL::CBitStream* s);
60 
65  void OnReceiveNormalUpdate(const string& id, NPL::CBitStream* s);
66 
74  bool SendCharacterUpdate(CBipedObject* pChar, CCharacterTracker* pCharTracker, NPL::CBitStream* s, const char* sIdentifier = NULL);
82  IGameObject* ReceiveCharacterUpdate(NPL::CBitStream* s, const char* sIdentifier = NULL);
83 
89  bool NetworkMoveCharacter(CBipedObject* pBiped,const D3DXVECTOR3& vDest,float fFacing, float fSpeed, float fVerticalSpeed, bool bForceRun, bool bForceWalk);
90 
91 
95  void HideTimeoutOPC();
96 
97  private:
100  void UpdateGameObjects(double dTimeDelta);
101 
105  void InactivateOPC();
107  void RemoveInactiveOPC();
108 
110  list <ActiveTerrain*> m_listActiveTerrain;
113  list <ActiveBiped*> m_listActiveBiped;
114 
116  list <CBipedObject*> m_listVIPBipeds;
117 
121  CNetTime m_time;
122  };
123 
124 }
this is the environment simulator of a standard game world server.
Definition: EnvSimClient.h:14
virtual SIMULATOR_TYPE GetSimulatorType()
return the current type of simulator.
Definition: EnvSimClient.h:23
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
it is a class for holding various character trackers by their name.
Definition: GameNetCommon.h:188
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: EnvSimClient.h:47
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