diff options
| author | oy <Tom_Adams@web.de> | 2011-04-13 20:37:12 +0200 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2011-04-13 20:37:12 +0200 |
| commit | 06115dd49dca2f8eb5f14606437e8fd20037cc4d (patch) | |
| tree | 5ec4bca6158319b3f5285d7689c5f94ae8da8c93 /src/game/client/gameclient.h | |
| parent | 63e059b8fff6498e42b765a1dca000e53005ea77 (diff) | |
| download | zcatch-06115dd49dca2f8eb5f14606437e8fd20037cc4d.tar.gz zcatch-06115dd49dca2f8eb5f14606437e8fd20037cc4d.zip | |
added "Whitespace and line Endings cleanup" by GreYFoX
Diffstat (limited to 'src/game/client/gameclient.h')
| -rw-r--r-- | src/game/client/gameclient.h | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/src/game/client/gameclient.h b/src/game/client/gameclient.h index 7aa02ace..a89f4e86 100644 --- a/src/game/client/gameclient.h +++ b/src/game/client/gameclient.h @@ -19,18 +19,18 @@ class CGameClient : public IGameClient { MAX_COMPONENTS = 64, }; - + CStack(); void Add(class CComponent *pComponent); - + class CComponent *m_paComponents[MAX_COMPONENTS]; int m_Num; }; - + CStack m_All; CStack m_Input; CNetObjHandler m_NetObjHandler; - + class IEngine *m_pEngine; class IInput *m_pInput; class IGraphics *m_pGraphics; @@ -44,11 +44,11 @@ class CGameClient : public IGameClient class IServerBrowser *m_pServerBrowser; class IEditor *m_pEditor; class IFriends *m_pFriends; - + CLayers m_Layers; class CCollision m_Collision; CUI m_UI; - + void DispatchInput(); void ProcessEvents(); void UpdatePositions(); @@ -60,9 +60,9 @@ class CGameClient : public IGameClient static void ConTeam(IConsole::IResult *pResult, void *pUserData); static void ConKill(IConsole::IResult *pResult, void *pUserData); - + static void ConchainSpecialInfoupdate(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData); - + public: IKernel *Kernel() { return IInterface::Kernel(); } IEngine *Engine() const { return m_pEngine; } @@ -82,7 +82,7 @@ public: class CCollision *Collision() { return &m_Collision; }; class IEditor *Editor() { return m_pEditor; } class IFriends *Friends() { return m_pFriends; } - + int NetobjNumCorrections() { return m_NetObjHandler.NumObjCorrections(); } const char *NetobjCorrectedOn() { return m_NetObjHandler.CorrectedObjOn(); } @@ -92,7 +92,7 @@ public: // TODO: move this CTuningParams m_Tuning; - + enum { SERVERMODE_PURE=0, @@ -124,11 +124,11 @@ public: const CNetObj_PlayerInfo *m_paPlayerInfos[MAX_CLIENTS]; const CNetObj_PlayerInfo *m_paInfoByScore[MAX_CLIENTS]; - + int m_LocalClientID; int m_NumPlayers; int m_aTeamSize[2]; - + // spectate data struct CSpectateInfo { @@ -137,32 +137,32 @@ public: bool m_UsePosition; vec2 m_Position; } m_SpecInfo; - + // struct CCharacterInfo { bool m_Active; - + // snapshots CNetObj_Character m_Prev; CNetObj_Character m_Cur; - + // interpolated position vec2 m_Position; }; - + CCharacterInfo m_aCharacters[MAX_CLIENTS]; }; CSnapState m_Snap; - + // client data struct CClientData { int m_UseCustomColor; int m_ColorBody; int m_ColorFeet; - + char m_aName[MAX_NAME_LENGTH]; char m_aClan[MAX_CLAN_LENGTH]; int m_Country; @@ -173,23 +173,23 @@ public: int m_Emoticon; int m_EmoticonStart; CCharacterCore m_Predicted; - + CTeeRenderInfo m_SkinInfo; // this is what the server reports CTeeRenderInfo m_RenderInfo; // this is what we use - + float m_Angle; bool m_Active; bool m_ChatIgnore; bool m_Friend; - + void UpdateRenderInfo(); void Reset(); }; CClientData m_aClients[MAX_CLIENTS]; - + CRenderTools m_RenderTools; - + void OnReset(); // hooks @@ -209,19 +209,19 @@ public: virtual void OnRconLine(const char *pLine); virtual void OnGameOver(); virtual void OnStartGame(); - + virtual const char *GetItemName(int Type); virtual int GetCountryIndex(int Code); virtual const char *Version(); virtual const char *NetVersion(); - - + + // actions // TODO: move these void SendSwitchTeam(int Team); void SendInfo(bool Start); void SendKill(int ClientID); - + // pointers to all systems class CGameConsole *m_pGameConsole; class CBinds *m_pBinds; @@ -246,12 +246,12 @@ public: inline float HueToRgb(float v1, float v2, float h) { - if(h < 0.0f) h += 1; - if(h > 1.0f) h -= 1; - if((6.0f * h) < 1.0f) return v1 + (v2 - v1) * 6.0f * h; - if((2.0f * h) < 1.0f) return v2; - if((3.0f * h) < 2.0f) return v1 + (v2 - v1) * ((2.0f/3.0f) - h) * 6.0f; - return v1; + if(h < 0.0f) h += 1; + if(h > 1.0f) h -= 1; + if((6.0f * h) < 1.0f) return v1 + (v2 - v1) * 6.0f * h; + if((2.0f * h) < 1.0f) return v2; + if((3.0f * h) < 2.0f) return v1 + (v2 - v1) * ((2.0f/3.0f) - h) * 6.0f; + return v1; } inline vec3 HslToRgb(vec3 HSL) |