DDNet documentation
Loading...
Searching...
No Matches
gameclient.h
Go to the documentation of this file.
1/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
2/* If you are missing that file, acquire a complete release at teeworlds.com. */
3#ifndef GAME_CLIENT_GAMECLIENT_H
4#define GAME_CLIENT_GAMECLIENT_H
5
6#include "render.h"
7
8#include <base/color.h>
9#include <base/types.h>
10#include <base/vmath.h>
11
12#include <engine/client.h>
13#include <engine/client/enums.h>
14#include <engine/console.h>
17
18#include <generated/protocol7.h>
19#include <generated/protocolglue.h>
20
22#include <game/client/race.h>
23#include <game/collision.h>
24#include <game/gamecore.h>
25#include <game/layers.h>
26#include <game/map/render_map.h>
27#include <game/mapbugs.h>
28#include <game/teamscore.h>
29
30// components
32#include "components/binds.h"
34#include "components/camera.h"
35#include "components/censor.h"
36#include "components/chat.h"
37#include "components/console.h"
38#include "components/controls.h"
41#include "components/debughud.h"
42#include "components/effects.h"
43#include "components/emoticon.h"
44#include "components/flow.h"
46#include "components/ghost.h"
47#include "components/hud.h"
50#include "components/items.h"
57#include "components/menus.h"
58#include "components/motd.h"
61#include "components/players.h"
64#include "components/skins.h"
65#include "components/skins7.h"
66#include "components/sounds.h"
70#include "components/voting.h"
71
72#include <memory>
73#include <vector>
74
75class IMap;
76
134
136{
137public:
139 const CNetObj_EntityEx *m_pDataEx;
140};
141
143{
146 INDENT_FORCE, // for rendering settings preview
147};
148
150{
151public:
152 // all components
181
187
192
194
198
199private:
200 std::vector<class CComponent *> m_vpAll;
201 std::vector<class CComponent *> m_vpInput;
202 CNetObjHandler m_NetObjHandler;
203 protocol7::CNetObjHandler m_NetObjHandler7;
204
222#if defined(CONF_AUTOUPDATE)
223 class IUpdater *m_pUpdater;
224#endif
226
231
232 void ProcessEvents();
233 void UpdatePositions();
234
237
240
243
246
248
250
251 static void ConTeam(IConsole::IResult *pResult, void *pUserData);
252 static void ConKill(IConsole::IResult *pResult, void *pUserData);
253 static void ConReadyChange7(IConsole::IResult *pResult, void *pUserData);
254
255 static void ConchainLanguageUpdate(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData);
256 static void ConchainSpecialInfoupdate(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData);
257 static void ConchainSpecialDummyInfoupdate(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData);
258 static void ConchainRefreshSkins(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData);
259 static void ConchainRefreshEventSkins(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData);
260 static void ConchainSpecialDummy(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData);
261
262 static void ConTuneParam(IConsole::IResult *pResult, void *pUserData);
263 static void ConTuneZone(IConsole::IResult *pResult, void *pUserData);
264 static void ConMapbug(IConsole::IResult *pResult, void *pUserData);
265
266 static void ConchainMenuMap(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData);
267
268 static std::function<bool(int, int, int, int)> GetScoreComparator(bool TimeScore, bool ReceivedMillisecondFinishTimes, bool Race7);
269
270 // only used in OnPredict
273
274 // only used in OnNewSnapshot
275 bool m_GameOver = false;
276 bool m_GamePaused = false;
277
278public:
280 IEngine *Engine() const { return m_pEngine; }
281 class IGraphics *Graphics() const { return m_pGraphics; }
282 class IClient *Client() const { return m_pClient; }
283 class CUi *Ui() { return &m_UI; }
284 class ISound *Sound() const { return m_pSound; }
285 class IInput *Input() const { return m_pInput; }
286 class IStorage *Storage() const { return m_pStorage; }
288 class CConfig *Config() const { return m_pConfig; }
289 class IConsole *Console() { return m_pConsole; }
290 class ITextRender *TextRender() const { return m_pTextRender; }
291 class IDemoPlayer *DemoPlayer() const { return m_pDemoPlayer; }
292 class IDemoRecorder *DemoRecorder(int Recorder) const { return Client()->DemoRecorder(Recorder); }
293 class IFavorites *Favorites() const { return m_pFavorites; }
296 class CRenderMap *RenderMap() { return &m_RenderMap; }
297 class CLayers *Layers() { return &m_Layers; }
299 const CCollision *Collision() const { return &m_Collision; }
300 const CRaceHelper *RaceHelper() const { return &m_RaceHelper; }
301 class IEditor *Editor() { return m_pEditor; }
302 class IFriends *Friends() { return m_pFriends; }
303 class IFriends *Foes() { return m_pFoes; }
304#if defined(CONF_AUTOUPDATE)
305 class IUpdater *Updater()
306 {
307 return m_pUpdater;
308 }
309#endif
310 class IHttp *Http()
311 {
312 return m_pHttp;
313 }
314
316 {
317 return m_NetObjHandler.NumObjCorrections();
318 }
319 const char *NetobjCorrectedOn() { return m_NetObjHandler.CorrectedObjOn(); }
320
325
326 enum
327 {
331 };
334
336
338
349
350 // snap pointers
352 {
353 public:
354 const CNetObj_Character *m_pLocalCharacter;
355 const CNetObj_Character *m_pLocalPrevCharacter;
356 const CNetObj_PlayerInfo *m_pLocalInfo;
357 const CNetObj_SpectatorInfo *m_pSpectatorInfo;
358 const CNetObj_SpectatorInfo *m_pPrevSpectatorInfo;
359 const CNetObj_SpectatorCount *m_pSpectatorCount;
361 const CNetObj_Flag *m_apFlags[CSnapshot::MAX_ITEMS];
363 const CNetObj_GameInfo *m_pGameInfoObj;
364 const CNetObj_GameData *m_pGameDataObj;
365 const CNetObj_GameData *m_pPrevGameDataObj;
366
367 const CNetObj_PlayerInfo *m_apPlayerInfos[MAX_CLIENTS];
368 const CNetObj_PlayerInfo *m_apPrevPlayerInfos[MAX_CLIENTS];
369
370 const CNetObj_PlayerInfo *m_apInfoByScore[MAX_CLIENTS];
371 const CNetObj_PlayerInfo *m_apInfoByName[MAX_CLIENTS];
372 const CNetObj_PlayerInfo *m_apInfoByDDTeamScore[MAX_CLIENTS];
373 const CNetObj_PlayerInfo *m_apInfoByDDTeamName[MAX_CLIENTS];
374
379
394
396 {
397 public:
399
400 // snapshots
401 CNetObj_Character m_Prev;
402 CNetObj_Character m_Cur;
403
404 CNetObj_DDNetCharacter m_ExtendedData;
405 const CNetObj_DDNetCharacter *m_pPrevExtendedData;
408 };
410 };
411
413 int m_aLocalTuneZone[NUM_DUMMIES]; // current tunezone (0-255)
414 bool m_aReceivedTuning[NUM_DUMMIES]; // was tuning message received after zone change
415 int m_aExpectingTuningForZone[NUM_DUMMIES]; // tunezone changed, waiting for tuning for that zone
416 int m_aExpectingTuningSince[NUM_DUMMIES]; // how many snaps received since tunezone changed
417 CTuningParams m_aTuning[NUM_DUMMIES]; // current local player tuning, only what the player/dummy has
418
419 std::bitset<RECORDER_MAX> m_ActiveRecordings;
420
421 // spectate cursor data
423 {
424 friend class CGameClient;
425 static constexpr int CURSOR_SAMPLES = 8; // how many samples to keep
426 static constexpr int SAMPLE_FRAME_WINDOW = 3; // how many samples should be used for polynomial interpolation
427 static constexpr int SAMPLE_FRAME_OFFSET = 2; // how many samples in the past should be included
428 static constexpr double INTERP_DELAY = 4.25; // how many ticks in the past to show, enables extrapolation with smaller value (<= SAMPLE_FRAME_WINDOW - SAMPLE_FRAME_OFFSET + 3)
429 static constexpr double REST_THRESHOLD = 3.0; // how many ticks of the same samples are considered to be resting
430
435
441
442 public:
443 bool IsAvailable() const { return m_Available; }
444 int Weapon() const { return m_Weapon; }
445 vec2 Target() const { return m_Target; }
446 vec2 WorldTarget() const { return m_WorldTarget; }
447 vec2 Position() const { return m_Position; }
449
450 // client data
452 {
453 friend class CGameClient;
456
457 public:
461
473
474 bool m_Solo;
492
495
496 std::shared_ptr<CManagedTeeRenderInfo> m_pSkinInfo = nullptr; // this is what the server reports
497 CTeeRenderInfo m_RenderInfo; // this is what we use
498
499 float m_Angle;
504 bool m_Foe;
505
507 bool m_Afk;
509 bool m_Spec;
510
513
514 // Editor allows 256 switches for now.
516
517 CNetObj_Character m_Snapped;
518 CNetObj_Character m_Evolved;
519
520 CNetMsg_Sv_PreInput m_aPreInputs[200];
521
522 // rendered characters
523 CNetObj_Character m_RenderCur;
524 CNetObj_Character m_RenderPrev;
528 int64_t m_aSmoothStart[2];
529 int64_t m_aSmoothLen[2];
531 int m_aPredTick[200];
534
535 void UpdateSkinInfo();
536 void UpdateSkin7HatSprite(int Dummy);
537 void UpdateSkin7BotDecoration(int Dummy);
538 void UpdateRenderInfo();
539 void Reset();
541
542 int ClientId() const { return m_ClientId; }
543
544 class CSixup
545 {
546 public:
547 void Reset();
548
549 char m_aaSkinPartNames[protocol7::NUM_SKINPARTS][protocol7::MAX_SKIN_LENGTH];
550 int m_aUseCustomColors[protocol7::NUM_SKINPARTS];
551 int m_aSkinPartColors[protocol7::NUM_SKINPARTS];
552 };
553
554 // 0.7 Skin
556 };
557
559
561 {
565
566 public:
567 CClientStats();
568
569 int m_aFragsWith[NUM_WEAPONS];
570 int m_aDeathsFrom[NUM_WEAPONS];
576
579
580 void Reset();
581
582 bool IsActive() const { return m_Active; }
583 void JoinGame(int Tick)
584 {
585 m_Active = true;
586 m_JoinTick = Tick;
587 }
588 void JoinSpec(int Tick)
589 {
590 m_Active = false;
591 m_IngameTicks += Tick - m_JoinTick;
592 }
593 int GetIngameTicks(int Tick) const { return m_IngameTicks + Tick - m_JoinTick; }
594 float GetFPM(int Tick, int TickSpeed) const { return (float)(m_Frags * TickSpeed * 60) / GetIngameTicks(Tick); }
595 };
596
598
601
603
604 void OnReset();
605
606 size_t ComponentCount() const { return m_vpAll.size(); }
607
608 // hooks
609 void OnConnected() override;
610 void OnRender() override;
611 void OnUpdate() override;
612 void OnDummyDisconnect() override;
613 virtual void OnRelease();
614 void OnInit() override;
615 void OnConsoleInit() override;
616 void OnStateChange(int NewState, int OldState) override;
617 template<typename T>
618 void ApplySkin7InfoFromGameMsg(const T *pMsg, int ClientId, int Conn);
619 void ApplySkin7InfoFromSnapObj(const protocol7::CNetObj_De_ClientInfo *pObj, int ClientId) override;
620 int OnDemoRecSnap7(CSnapshot *pFrom, CSnapshotBuffer *pTo, int Conn) override;
621 void *TranslateGameMsg(int *pMsgId, CUnpacker *pUnpacker, int Conn);
622 int TranslateSnap(CSnapshotBuffer *pSnapDstSix, CSnapshot *pSnapSrcSeven, int Conn, bool Dummy) override;
623 void OnMessage(int MsgId, CUnpacker *pUnpacker, int Conn, bool Dummy) override;
624 void InvalidateSnapshot() override;
625 void OnNewSnapshot(bool DummySwapped) override;
626 void OnPredict() override;
627 void OnActivateEditor() override;
628 void OnDummySwap() override;
629 int OnSnapInput(int *pData, bool Dummy, bool Force) override;
630 void OnShutdown() override;
631 void OnEnterGame() override;
632 void OnRconType(bool UsernameReq) override;
633 void OnRconLine(const char *pLine) override;
634 virtual void OnGameOver();
635 virtual void OnStartGame();
636 virtual void OnStartRound();
637 virtual void OnFlagGrab(int TeamId);
638 void OnWindowResize() override;
639
640 void InitializeLanguage() override;
641 bool m_LanguageChanged = false;
642 void OnLanguageChange();
644
646
647 void RefreshSkin(const std::shared_ptr<CManagedTeeRenderInfo> &pManagedTeeRenderInfo);
648 void RefreshSkins(int SkinDescriptorFlags);
649 void OnSkinUpdate(const char *pSkinName);
650 std::shared_ptr<CManagedTeeRenderInfo> CreateManagedTeeRenderInfo(const CTeeRenderInfo &TeeRenderInfo, const CSkinDescriptor &SkinDescriptor);
651 std::shared_ptr<CManagedTeeRenderInfo> CreateManagedTeeRenderInfo(const CClientData &Client);
652 void CollectManagedTeeRenderInfos(const std::function<void(const char *pSkinName)> &ActiveSkinAcceptor);
653
654 void RenderShutdownMessage() override;
655 void ProcessDemoSnapshot(CSnapshot *pSnap) override;
656
657 const char *GetItemName(int Type) const override;
658 const char *Version() const override;
659 const char *NetVersion() const override;
660 const char *NetVersion7() const override;
661 int DDNetVersion() const override;
662 const char *DDNetVersionStr() const override;
663 int ClientVersion7() const override;
664
665 void DoTeamChangeMessage7(const char *pName, int ClientId, int Team, const char *pPrefix = "");
666
667 // actions
668 // TODO: move these
669 void SendSwitchTeam(int Team) const;
670 void SendStartInfo7(bool Dummy);
671 void SendSkinChange7(bool Dummy);
672 // Returns true if the requested skin change got applied by the server
673 bool GotWantedSkin7(bool Dummy);
674 void SendInfo(bool Start);
675 void SendDummyInfo(bool Start) override;
676 void SendKill() const;
677 void SendReadyChange7(); // NOLINT(readability-make-member-function-const)
678
679 void ApplyPreInputs(int Tick, bool Direct, CGameWorld &GameWorld);
680
682
683 // DDRace
684
686 CNetObj_PlayerInput m_DummyInput;
687 CNetObj_PlayerInput m_HammerInput;
688 unsigned int m_DummyFire;
692
694
695 int IntersectCharacter(vec2 HookPos, vec2 NewPos, vec2 &NewPos2, int OwnId, vec2 *pPlayerPosition = nullptr);
696
697 int LastRaceTick() const;
698 int CurrentRaceTime() const;
699
700 bool IsTeamPlay() const;
701 int MinTeamSize() const;
702 int MaxTeamSize() const;
703 bool IsWorldPaused() const;
704 bool IsDemoPlaybackPaused() const;
705 float GetAnimationPlaybackSpeed() const;
706
707 int AntiPingPlayers() const;
708 bool AntiPingGrenade() const;
709 bool AntiPingWeapons() const;
710 bool AntiPingGunfire() const;
711 bool Predict() const;
712 bool PredictDummy() const;
713
714 const CTuningParams *GetTuning(int i) const { return &m_aTuningList[i]; }
715 ColorRGBA GetDDTeamColor(int DDTeam, float Lightness = 0.5f) const;
716 void FormatClientId(int ClientId, char (&aClientId)[16], EClientIdFormat Format) const;
717
721
722 std::vector<SSwitchers> &Switchers() { return m_GameWorld.m_Core.m_vSwitchers; }
723 std::vector<SSwitchers> &PredSwitchers() { return m_PredictedWorld.m_Core.m_vSwitchers; }
724
725 void DummyResetInput() override;
726 void Echo(const char *pString) override;
727 bool IsOtherTeam(int ClientId) const;
728 int SwitchStateTeam() const;
729 bool IsLocalCharSuper() const;
730 bool CanDisplayWarning() const override;
731
732 IMap *Map() override { return m_pMap.get(); }
733 const IMap *Map() const override { return m_pMap.get(); }
734 CNetObjHandler *GetNetObjHandler() override;
735 protocol7::CNetObjHandler *GetNetObjHandler7() override;
736
737 void LoadGameSkin(const char *pPath, bool AsDir = false);
738 void LoadEmoticonsSkin(const char *pPath, bool AsDir = false);
739 void LoadParticlesSkin(const char *pPath, bool AsDir = false);
740 void LoadHudSkin(const char *pPath, bool AsDir = false);
741 void LoadExtrasSkin(const char *pPath, bool AsDir = false);
742
744 {
745 public:
746 bool m_Loaded = false;
747
748 // health armor hud
753
754 // cursors
761
763
764 // weapons and hook
773
775
776 // particles
778
779 // stars
781
782 // projectiles
789
791
792 // muzzles
796
798
799 // pickups
813
816
817 // flags
820
821 // ninja bar (0.7)
826
827 bool IsSixup() const
828 {
830 }
831 };
833
849
851 {
852 public:
853 bool m_Loaded = false;
855 };
857
859 {
860 public:
861 bool m_Loaded = false;
893 };
895
907
908 const std::vector<CSnapEntities> &SnapEntities() { return m_vSnapEntities; }
909
915
916 void ResetMultiView();
918 void CleanMultiViewId(int ClientId);
922
923private:
924 std::unique_ptr<IMap> m_pMap;
925
926 std::vector<CSnapEntities> m_vSnapEntities;
927 void SnapCollectEntities();
928
931 int m_aEnableSpectatorCount[NUM_DUMMIES]; // current setting as sent to the server, -1 if not yet sent
932
934 {
935 public:
936 bool IsLoaded() const { return m_ImageInfo.m_pData != nullptr; }
937
941 std::optional<CImageInfo> m_FallbackImageInfo;
942 };
943
944 CImageAsset LoadAssetFromPath(const char *pPath, bool AsDir, int AssetId, const char *pDirectory) const;
945
946 std::vector<std::shared_ptr<CManagedTeeRenderInfo>> m_vpManagedTeeRenderInfos;
948
949 void UpdateLocalTuning();
950 void UpdatePrediction();
953 void HandlePredictedEvents(int Tick);
954
955 void OnInput(const IInput::CEvent &Event);
956
958 void DetectStrongHook();
959
960 vec2 GetSmoothPos(int ClientId);
961
965
966 void LoadMapSettings();
968
969 // tunings for every zone on the map, 0 is a global tune
972
979
980 bool InitMultiView(int Team);
981 void HandleMultiView();
982 bool IsMultiViewIdSet();
983 void CleanMultiViewIds();
984 float CalculateMultiViewMultiplier(vec2 TargetPos);
985 float CalculateMultiViewZoom(vec2 MinPos, vec2 MaxPos, float Vel);
986 float MapValue(float MaxValue, float MinValue, float MaxRange, float MinRange, float Value);
987
1000
1002
1003 void OnSaveCodeNetMessage(const CNetMsg_Sv_SaveCode *pMsg);
1004 void StoreSave(const char *pTeamMembers, const char *pGeneratedCode) const;
1005};
1006
1008
1009#endif
Definition background.h:18
Definition binds.h:45
Definition broadcast.h:11
Definition camera.h:14
Definition censor.h:67
Definition gameworld.h:158
Definition gamecore.h:182
Definition chat.h:24
Definition collision.h:35
Definition config.h:30
Definition controls.h:16
Definition countryflags.h:15
Definition damageind.h:11
Definition debughud.h:10
Definition effects.h:11
Definition emoticon.h:13
Definition flow.h:10
Definition freezebars.h:6
Definition gameclient.h:545
int m_aUseCustomColors[protocol7::NUM_SKINPARTS]
Definition gameclient.h:550
void Reset()
Definition gameclient.cpp:3135
int m_aSkinPartColors[protocol7::NUM_SKINPARTS]
Definition gameclient.h:551
char m_aaSkinPartNames[protocol7::NUM_SKINPARTS][protocol7::MAX_SKIN_LENGTH]
Definition gameclient.h:549
Definition gameclient.h:452
int m_ColorFeet
Definition gameclient.h:460
bool m_ChatIgnore
Definition gameclient.h:501
bool m_HookHitDisabled
Definition gameclient.h:483
void UpdateSkinInfo()
Definition gameclient.cpp:2919
vec2 m_SpecChar
Definition gameclient.h:533
CSkinDescriptor ToSkinDescriptor() const
Definition gameclient.cpp:3108
int ClientId() const
Definition gameclient.h:542
int m_FreezeEnd
Definition gameclient.h:489
CNetMsg_Sv_PreInput m_aPreInputs[200]
Definition gameclient.h:520
char m_aClan[MAX_CLAN_LENGTH]
Definition gameclient.h:463
std::shared_ptr< CManagedTeeRenderInfo > m_pSkinInfo
Definition gameclient.h:496
bool m_Foe
Definition gameclient.h:504
int m_aPredTick[200]
Definition gameclient.h:531
bool m_EndlessHook
Definition gameclient.h:477
bool m_LiveFrozen
Definition gameclient.h:491
int m_Emoticon
Definition gameclient.h:470
bool m_DeepFrozen
Definition gameclient.h:490
bool m_Friend
Definition gameclient.h:503
vec2 m_aPredPos[200]
Definition gameclient.h:530
CCharacterCore m_Predicted
Definition gameclient.h:493
bool m_IsPredicted
Definition gameclient.h:526
bool m_Super
Definition gameclient.h:484
bool m_Active
Definition gameclient.h:500
CNetObj_Character m_RenderCur
Definition gameclient.h:523
bool m_HasTelegunLaser
Definition gameclient.h:488
int64_t m_aSmoothLen[2]
Definition gameclient.h:529
float m_EmoticonStartFraction
Definition gameclient.h:471
int m_ColorBody
Definition gameclient.h:459
int m_FinishTimeMillis
Definition gameclient.h:512
CGameClient * m_pGameClient
Definition gameclient.h:454
vec2 m_RenderPos
Definition gameclient.h:525
int m_Team
Definition gameclient.h:469
int m_AuthLevel
Definition gameclient.h:506
bool m_aSwitchStates[256]
Definition gameclient.h:515
bool m_ShotgunHitDisabled
Definition gameclient.h:482
bool m_Solo
Definition gameclient.h:474
int m_ClientId
Definition gameclient.h:455
bool m_HasTelegunGun
Definition gameclient.h:486
int m_EmoticonStartTick
Definition gameclient.h:472
int m_FinishTimeSeconds
Definition gameclient.h:511
void UpdateRenderInfo()
Definition gameclient.cpp:2970
bool m_Invincible
Definition gameclient.h:485
char m_aName[MAX_NAME_LENGTH]
Definition gameclient.h:462
CNetObj_Character m_Evolved
Definition gameclient.h:518
friend class CGameClient
Definition gameclient.h:453
CNetObj_Character m_RenderPrev
Definition gameclient.h:524
bool m_GrenadeHitDisabled
Definition gameclient.h:480
bool m_HammerHitDisabled
Definition gameclient.h:479
bool m_Jetpack
Definition gameclient.h:475
CSixup m_aSixup[NUM_DUMMIES]
Definition gameclient.h:555
bool m_Afk
Definition gameclient.h:507
float m_Angle
Definition gameclient.h:499
bool m_Spec
Definition gameclient.h:509
CNetObj_Character m_Snapped
Definition gameclient.h:517
bool m_IsPredictedLocal
Definition gameclient.h:527
CTeeRenderInfo m_RenderInfo
Definition gameclient.h:497
bool m_CollisionDisabled
Definition gameclient.h:476
bool m_EmoticonIgnore
Definition gameclient.h:502
void Reset()
Definition gameclient.cpp:3024
int m_Country
Definition gameclient.h:467
bool m_SpecCharPresent
Definition gameclient.h:532
int m_UseCustomColor
Definition gameclient.h:458
char m_aSkinName[MAX_SKIN_LENGTH]
Definition gameclient.h:468
int64_t m_aSmoothStart[2]
Definition gameclient.h:528
bool m_EndlessJump
Definition gameclient.h:478
bool m_HasTelegunGrenade
Definition gameclient.h:487
void UpdateSkin7BotDecoration(int Dummy)
Definition sixup_translate_game.cpp:143
bool m_Paused
Definition gameclient.h:508
void UpdateSkin7HatSprite(int Dummy)
Definition sixup_translate_game.cpp:124
CCharacterCore m_PrevPredicted
Definition gameclient.h:494
bool m_LaserHitDisabled
Definition gameclient.h:481
Definition gameclient.h:561
bool IsActive() const
Definition gameclient.h:582
float GetFPM(int Tick, int TickSpeed) const
Definition gameclient.h:594
int m_FlagGrabs
Definition gameclient.h:577
int m_aFragsWith[NUM_WEAPONS]
Definition gameclient.h:569
int m_aDeathsFrom[NUM_WEAPONS]
Definition gameclient.h:570
int GetIngameTicks(int Tick) const
Definition gameclient.h:593
int m_Suicides
Definition gameclient.h:573
void Reset()
Definition gameclient.cpp:2901
int m_BestSpree
Definition gameclient.h:574
int m_JoinTick
Definition gameclient.h:563
int m_Deaths
Definition gameclient.h:572
int m_CurrentSpree
Definition gameclient.h:575
int m_FlagCaptures
Definition gameclient.h:578
void JoinGame(int Tick)
Definition gameclient.h:583
bool m_Active
Definition gameclient.h:564
void JoinSpec(int Tick)
Definition gameclient.h:588
int m_Frags
Definition gameclient.h:571
int m_IngameTicks
Definition gameclient.h:562
CClientStats()
Definition gameclient.cpp:2896
Definition gameclient.h:423
int m_NumSamples
Definition gameclient.h:434
static constexpr int SAMPLE_FRAME_WINDOW
Definition gameclient.h:426
vec2 m_Position
Definition gameclient.h:440
int m_CursorOwnerId
Definition gameclient.h:431
bool m_Available
Definition gameclient.h:436
bool IsAvailable() const
Definition gameclient.h:443
static constexpr double INTERP_DELAY
Definition gameclient.h:428
vec2 Position() const
Definition gameclient.h:447
static constexpr int SAMPLE_FRAME_OFFSET
Definition gameclient.h:427
int Weapon() const
Definition gameclient.h:444
vec2 Target() const
Definition gameclient.h:445
friend class CGameClient
Definition gameclient.h:424
static constexpr int CURSOR_SAMPLES
Definition gameclient.h:425
vec2 m_Target
Definition gameclient.h:438
static constexpr double REST_THRESHOLD
Definition gameclient.h:429
vec2 m_WorldTarget
Definition gameclient.h:439
int m_Weapon
Definition gameclient.h:437
vec2 m_aTargetSamplesData[CURSOR_SAMPLES]
Definition gameclient.h:433
vec2 WorldTarget() const
Definition gameclient.h:446
double m_aTargetSamplesTime[CURSOR_SAMPLES]
Definition gameclient.h:432
Definition gameclient.h:851
bool m_Loaded
Definition gameclient.h:853
IGraphics::CTextureHandle m_aSpriteEmoticons[16]
Definition gameclient.h:854
Definition gameclient.h:897
bool m_Loaded
Definition gameclient.h:899
IGraphics::CTextureHandle m_SpriteParticleSparkle
Definition gameclient.h:901
IGraphics::CTextureHandle m_aSpriteParticles[4]
Definition gameclient.h:904
IGraphics::CTextureHandle m_SpritePulley
Definition gameclient.h:902
IGraphics::CTextureHandle m_SpriteParticleSnowflake
Definition gameclient.h:900
IGraphics::CTextureHandle m_SpriteHectagon
Definition gameclient.h:903
Definition gameclient.h:744
IGraphics::CTextureHandle m_SpriteWeaponGrenadeProjectile
Definition gameclient.h:785
bool IsSixup() const
Definition gameclient.h:827
IGraphics::CTextureHandle m_SpritePickupLaser
Definition gameclient.h:809
IGraphics::CTextureHandle m_aSpritePickupWeaponArmor[4]
Definition gameclient.h:815
IGraphics::CTextureHandle m_SpriteWeaponGun
Definition gameclient.h:768
IGraphics::CTextureHandle m_SpriteWeaponShotgun
Definition gameclient.h:769
IGraphics::CTextureHandle m_SpriteHealthEmpty
Definition gameclient.h:750
IGraphics::CTextureHandle m_aSpriteWeaponCursors[6]
Definition gameclient.h:762
IGraphics::CTextureHandle m_SpriteNinjaBarFullLeft
Definition gameclient.h:822
IGraphics::CTextureHandle m_SpriteWeaponNinjaCursor
Definition gameclient.h:759
IGraphics::CTextureHandle m_aSpritePickupWeapons[6]
Definition gameclient.h:814
IGraphics::CTextureHandle m_SpriteWeaponLaser
Definition gameclient.h:772
IGraphics::CTextureHandle m_SpriteWeaponGrenade
Definition gameclient.h:770
IGraphics::CTextureHandle m_SpriteWeaponHammerCursor
Definition gameclient.h:755
IGraphics::CTextureHandle m_SpriteWeaponShotgunProjectile
Definition gameclient.h:784
IGraphics::CTextureHandle m_aSpriteWeapons[6]
Definition gameclient.h:774
IGraphics::CTextureHandle m_aaSpriteWeaponNinjaMuzzles[3]
Definition gameclient.h:795
IGraphics::CTextureHandle m_SpriteHookChain
Definition gameclient.h:765
IGraphics::CTextureHandle m_SpriteWeaponGunProjectile
Definition gameclient.h:783
IGraphics::CTextureHandle m_aaSpriteWeaponsMuzzles[6][3]
Definition gameclient.h:797
IGraphics::CTextureHandle m_SpritePickupGun
Definition gameclient.h:811
IGraphics::CTextureHandle m_SpritePickupArmorLaser
Definition gameclient.h:806
IGraphics::CTextureHandle m_SpriteWeaponLaserCursor
Definition gameclient.h:760
IGraphics::CTextureHandle m_aSpriteWeaponProjectiles[6]
Definition gameclient.h:790
IGraphics::CTextureHandle m_SpriteWeaponHammer
Definition gameclient.h:767
IGraphics::CTextureHandle m_aSpriteWeaponShotgunMuzzles[3]
Definition gameclient.h:794
IGraphics::CTextureHandle m_aSpriteWeaponGunMuzzles[3]
Definition gameclient.h:793
IGraphics::CTextureHandle m_SpriteFlagRed
Definition gameclient.h:819
IGraphics::CTextureHandle m_aSpriteStars[3]
Definition gameclient.h:780
IGraphics::CTextureHandle m_SpritePickupArmorGrenade
Definition gameclient.h:804
IGraphics::CTextureHandle m_SpriteHookHead
Definition gameclient.h:766
IGraphics::CTextureHandle m_SpritePickupArmor
Definition gameclient.h:802
IGraphics::CTextureHandle m_SpriteWeaponGunCursor
Definition gameclient.h:756
IGraphics::CTextureHandle m_SpriteArmorEmpty
Definition gameclient.h:752
IGraphics::CTextureHandle m_SpriteFlagBlue
Definition gameclient.h:818
IGraphics::CTextureHandle m_SpriteArmorFull
Definition gameclient.h:751
IGraphics::CTextureHandle m_SpriteNinjaBarFull
Definition gameclient.h:823
IGraphics::CTextureHandle m_SpriteNinjaBarEmptyRight
Definition gameclient.h:825
IGraphics::CTextureHandle m_SpritePickupShotgun
Definition gameclient.h:808
IGraphics::CTextureHandle m_SpritePickupNinja
Definition gameclient.h:810
IGraphics::CTextureHandle m_aSpriteParticles[9]
Definition gameclient.h:777
IGraphics::CTextureHandle m_SpriteNinjaBarEmpty
Definition gameclient.h:824
IGraphics::CTextureHandle m_SpriteWeaponGrenadeCursor
Definition gameclient.h:758
IGraphics::CTextureHandle m_SpriteWeaponHammerProjectile
Definition gameclient.h:786
IGraphics::CTextureHandle m_SpritePickupArmorShotgun
Definition gameclient.h:803
IGraphics::CTextureHandle m_SpriteWeaponLaserProjectile
Definition gameclient.h:788
bool m_Loaded
Definition gameclient.h:746
IGraphics::CTextureHandle m_SpriteWeaponShotgunCursor
Definition gameclient.h:757
IGraphics::CTextureHandle m_SpriteWeaponNinja
Definition gameclient.h:771
IGraphics::CTextureHandle m_SpritePickupArmorNinja
Definition gameclient.h:805
IGraphics::CTextureHandle m_SpriteHealthFull
Definition gameclient.h:749
IGraphics::CTextureHandle m_SpritePickupHealth
Definition gameclient.h:800
IGraphics::CTextureHandle m_SpritePickupFreeze
Definition gameclient.h:801
IGraphics::CTextureHandle m_SpritePickupHammer
Definition gameclient.h:812
IGraphics::CTextureHandle m_SpritePickupGrenade
Definition gameclient.h:807
IGraphics::CTextureHandle m_SpriteWeaponNinjaProjectile
Definition gameclient.h:787
Definition gameclient.h:859
bool m_Loaded
Definition gameclient.h:861
IGraphics::CTextureHandle m_SpriteHudGrenadeHitDisabled
Definition gameclient.h:880
IGraphics::CTextureHandle m_SpriteHudTeam0Mode
Definition gameclient.h:890
IGraphics::CTextureHandle m_SpriteHudHammerHitDisabled
Definition gameclient.h:878
IGraphics::CTextureHandle m_SpriteHudFreezeBarEmptyRight
Definition gameclient.h:872
IGraphics::CTextureHandle m_SpriteHudEndlessHook
Definition gameclient.h:867
IGraphics::CTextureHandle m_SpriteHudHookHitDisabled
Definition gameclient.h:877
IGraphics::CTextureHandle m_SpriteHudNinjaBarFull
Definition gameclient.h:874
IGraphics::CTextureHandle m_SpriteHudLockMode
Definition gameclient.h:889
IGraphics::CTextureHandle m_SpriteHudPracticeMode
Definition gameclient.h:888
IGraphics::CTextureHandle m_SpriteHudJetpack
Definition gameclient.h:868
IGraphics::CTextureHandle m_SpriteHudEndlessJump
Definition gameclient.h:866
IGraphics::CTextureHandle m_SpriteHudDummyHammer
Definition gameclient.h:891
IGraphics::CTextureHandle m_SpriteHudShotgunHitDisabled
Definition gameclient.h:879
IGraphics::CTextureHandle m_SpriteHudTeleportGun
Definition gameclient.h:886
IGraphics::CTextureHandle m_SpriteHudTeleportGrenade
Definition gameclient.h:885
IGraphics::CTextureHandle m_SpriteHudFreezeBarFull
Definition gameclient.h:870
IGraphics::CTextureHandle m_SpriteHudTeleportLaser
Definition gameclient.h:887
IGraphics::CTextureHandle m_SpriteHudDummyCopy
Definition gameclient.h:892
IGraphics::CTextureHandle m_SpriteHudSolo
Definition gameclient.h:864
IGraphics::CTextureHandle m_SpriteHudAirjump
Definition gameclient.h:862
IGraphics::CTextureHandle m_SpriteHudFreezeBarEmpty
Definition gameclient.h:871
IGraphics::CTextureHandle m_SpriteHudLiveFrozen
Definition gameclient.h:884
IGraphics::CTextureHandle m_SpriteHudNinjaBarEmpty
Definition gameclient.h:875
IGraphics::CTextureHandle m_SpriteHudNinjaBarFullLeft
Definition gameclient.h:873
IGraphics::CTextureHandle m_SpriteHudCollisionDisabled
Definition gameclient.h:865
IGraphics::CTextureHandle m_SpriteHudNinjaBarEmptyRight
Definition gameclient.h:876
IGraphics::CTextureHandle m_SpriteHudAirjumpEmpty
Definition gameclient.h:863
IGraphics::CTextureHandle m_SpriteHudGunHitDisabled
Definition gameclient.h:882
IGraphics::CTextureHandle m_SpriteHudFreezeBarFullLeft
Definition gameclient.h:869
IGraphics::CTextureHandle m_SpriteHudLaserHitDisabled
Definition gameclient.h:881
IGraphics::CTextureHandle m_SpriteHudDeepFrozen
Definition gameclient.h:883
Definition gameclient.h:934
bool m_IsDefault
Definition gameclient.h:939
CImageInfo m_ImageInfo
Definition gameclient.h:940
char m_aPath[IO_MAX_PATH_LENGTH]
Definition gameclient.h:938
bool IsLoaded() const
Definition gameclient.h:936
std::optional< CImageInfo > m_FallbackImageInfo
Definition gameclient.h:941
Definition gameclient.h:835
bool m_Loaded
Definition gameclient.h:837
IGraphics::CTextureHandle m_SpriteParticleSlice
Definition gameclient.h:838
IGraphics::CTextureHandle m_SpriteParticleSmoke
Definition gameclient.h:841
IGraphics::CTextureHandle m_SpriteParticleExpl
Definition gameclient.h:843
IGraphics::CTextureHandle m_aSpriteParticleSplat[3]
Definition gameclient.h:840
IGraphics::CTextureHandle m_SpriteParticleBall
Definition gameclient.h:839
IGraphics::CTextureHandle m_SpriteParticleHit
Definition gameclient.h:845
IGraphics::CTextureHandle m_aSpriteParticles[10]
Definition gameclient.h:846
IGraphics::CTextureHandle m_SpriteParticleAirJump
Definition gameclient.h:844
IGraphics::CTextureHandle m_SpriteParticleShell
Definition gameclient.h:842
Definition gameclient.h:396
CNetObj_Character m_Cur
Definition gameclient.h:402
bool m_HasExtendedDisplayInfo
Definition gameclient.h:407
const CNetObj_DDNetCharacter * m_pPrevExtendedData
Definition gameclient.h:405
CNetObj_DDNetCharacter m_ExtendedData
Definition gameclient.h:404
bool m_Active
Definition gameclient.h:398
bool m_HasExtendedData
Definition gameclient.h:406
CNetObj_Character m_Prev
Definition gameclient.h:401
Definition gameclient.h:381
bool m_UsePosition
Definition gameclient.h:385
int m_FollowFactor
Definition gameclient.h:391
int m_Deadzone
Definition gameclient.h:390
vec2 m_Position
Definition gameclient.h:386
bool m_Active
Definition gameclient.h:383
float m_Zoom
Definition gameclient.h:389
bool m_HasCameraInfo
Definition gameclient.h:388
int m_SpectatorId
Definition gameclient.h:384
Definition gameclient.h:352
int m_HighestClientId
Definition gameclient.h:378
int m_NumFlags
Definition gameclient.h:360
const CNetObj_PlayerInfo * m_pLocalInfo
Definition gameclient.h:356
const CNetObj_SpectatorInfo * m_pSpectatorInfo
Definition gameclient.h:357
const CNetObj_GameInfo * m_pGameInfoObj
Definition gameclient.h:363
const CNetObj_SpectatorInfo * m_pPrevSpectatorInfo
Definition gameclient.h:358
int m_LocalClientId
Definition gameclient.h:375
const CNetObj_PlayerInfo * m_apInfoByDDTeamScore[MAX_CLIENTS]
Definition gameclient.h:372
const CNetObj_PlayerInfo * m_apInfoByScore[MAX_CLIENTS]
Definition gameclient.h:370
const CNetObj_PlayerInfo * m_apInfoByName[MAX_CLIENTS]
Definition gameclient.h:371
int m_aTeamSize[2]
Definition gameclient.h:377
CSpectateInfo m_SpecInfo
Definition gameclient.h:393
const CNetObj_Character * m_pLocalPrevCharacter
Definition gameclient.h:355
CCharacterInfo m_aCharacters[MAX_CLIENTS]
Definition gameclient.h:409
const CNetObj_GameData * m_pPrevGameDataObj
Definition gameclient.h:365
const CNetObj_PlayerInfo * m_apPlayerInfos[MAX_CLIENTS]
Definition gameclient.h:367
const CNetObj_GameData * m_pGameDataObj
Definition gameclient.h:364
const CNetObj_Flag * m_apFlags[CSnapshot::MAX_ITEMS]
Definition gameclient.h:361
const CNetObj_PlayerInfo * m_apInfoByDDTeamName[MAX_CLIENTS]
Definition gameclient.h:373
const CNetObj_Character * m_pLocalCharacter
Definition gameclient.h:354
const CNetObj_SpectatorCount * m_pSpectatorCount
Definition gameclient.h:359
int m_NumPlayers
Definition gameclient.h:376
const CNetObj_Flag * m_apPrevFlags[CSnapshot::MAX_ITEMS]
Definition gameclient.h:362
const CNetObj_PlayerInfo * m_apPrevPlayerInfos[MAX_CLIENTS]
Definition gameclient.h:368
Definition gameclient.h:150
char m_aMapDescription[512]
Definition gameclient.h:921
void InitializeLanguage() override
Definition gameclient.cpp:282
void OnStateChange(int NewState, int OldState) override
Definition gameclient.cpp:1301
void DetectStrongHook()
Definition gameclient.cpp:3902
void UpdateSpectatorCursor()
Definition gameclient.cpp:3653
CTeamsCore m_Teams
Definition gameclient.h:693
CSkins7 m_Skins7
Definition gameclient.h:165
void DummyResetInput() override
Definition gameclient.cpp:4349
const char * DDNetVersionStr() const override
Definition gameclient.cpp:94
void RefreshSkins(int SkinDescriptorFlags)
Definition gameclient.cpp:4104
unsigned int m_DummyFire
Definition gameclient.h:688
void LoadGameSkin(const char *pPath, bool AsDir=false)
Definition assets.cpp:40
bool CanDisplayWarning() const override
Definition gameclient.cpp:4364
CCharacterCore m_PredictedChar
Definition gameclient.h:348
char m_aDDNetVersionStr[64]
Definition gameclient.h:249
int TranslateSnap(CSnapshotBuffer *pSnapDstSix, CSnapshot *pSnapSrcSeven, int Conn, bool Dummy) override
Definition sixup_translate_snapshot.cpp:12
float GetAnimationPlaybackSpeed() const
Definition gameclient.cpp:954
int AntiPingPlayers() const
Definition gameclient.cpp:967
float m_LastZoom
Definition gameclient.h:974
static void ConchainSpecialDummyInfoupdate(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData)
Definition gameclient.cpp:3369
CRenderTools m_RenderTools
Definition gameclient.h:599
class IConfigManager * m_pConfigManager
Definition gameclient.h:211
int m_PredictedTick
Definition gameclient.h:238
bool GotWantedSkin7(bool Dummy)
Definition gameclient.cpp:3187
void OnRender() override
Definition gameclient.cpp:768
int m_aCheckInfo[NUM_DUMMIES]
Definition gameclient.h:247
bool AntiPingWeapons() const
Definition gameclient.cpp:987
CSnapState m_Snap
Definition gameclient.h:412
const char * NetobjCorrectedOn()
Definition gameclient.h:319
bool m_NewTick
Definition gameclient.h:322
CKeyBinder m_KeyBinder
Definition gameclient.h:161
bool m_GameOver
Definition gameclient.h:275
CSounds m_Sounds
Definition gameclient.h:175
CNamePlates m_NamePlates
Definition gameclient.h:183
void SendSkinChange7(bool Dummy)
Definition gameclient.cpp:3171
int m_IsDummySwapping
Definition gameclient.h:962
IMap * Map() override
Definition gameclient.h:732
const CRaceHelper * RaceHelper() const
Definition gameclient.h:300
class IConsole * Console()
Definition gameclient.h:289
CSkins m_Skins
Definition gameclient.h:164
const CCollision * Collision() const
Definition gameclient.h:299
vec2 m_aLastPos[MAX_CLIENTS]
Definition gameclient.h:271
void OnInit() override
Definition gameclient.cpp:296
float m_LastFollowFactor
Definition gameclient.h:977
static void ConMapbug(IConsole::IResult *pResult, void *pUserData)
Definition gameclient.cpp:4312
bool m_BackButtonHandledKeyBind
Definition gameclient.h:602
int m_MultiViewTeam
Definition gameclient.h:910
bool m_SuppressEvents
Definition gameclient.h:321
float m_MultiViewPersonalZoom
Definition gameclient.h:911
float CalculateMultiViewZoom(vec2 MinPos, vec2 MaxPos, float Vel)
Definition multiview.cpp:310
class IServerBrowser * ServerBrowser() const
Definition gameclient.h:294
void HandlePredictedEvents(int Tick)
Definition gameclient.cpp:3854
CCountryFlags m_CountryFlags
Definition gameclient.h:166
CDebugHud m_DebugHud
Definition gameclient.h:170
class IGraphics * Graphics() const
Definition gameclient.h:281
int m_aNextChangeInfo[NUM_DUMMIES]
Definition gameclient.h:681
class IStorage * m_pStorage
Definition gameclient.h:214
bool AntiPingGunfire() const
Definition gameclient.cpp:995
static void ConTuneParam(IConsole::IResult *pResult, void *pUserData)
Definition gameclient.cpp:4290
IEngine * Engine() const
Definition gameclient.h:280
void OnRconLine(const char *pLine) override
Definition gameclient.cpp:1434
CNetObj_PlayerInput m_DummyInput
Definition gameclient.h:686
CCollision m_Collision
Definition gameclient.h:228
int m_MapBestTimeSeconds
Definition gameclient.h:919
int m_LastFlagCarrierRed
Definition gameclient.h:244
void OnActivateEditor() override
Definition gameclient.cpp:2891
class IEditor * Editor()
Definition gameclient.h:301
class IDemoPlayer * DemoPlayer() const
Definition gameclient.h:291
CInfoMessages m_InfoMessages
Definition gameclient.h:153
void RefreshSkin(const std::shared_ptr< CManagedTeeRenderInfo > &pManagedTeeRenderInfo)
Definition gameclient.cpp:4059
CHud m_Hud
Definition gameclient.h:168
void SendSwitchTeam(int Team) const
Definition gameclient.cpp:3145
void SendDummyInfo(bool Start) override
Definition gameclient.cpp:3269
class CConfig * Config() const
Definition gameclient.h:288
void DoTeamChangeMessage7(const char *pName, int ClientId, int Team, const char *pPrefix="")
Definition sixup_translate_game.cpp:76
void OnMessage(int MsgId, CUnpacker *pUnpacker, int Conn, bool Dummy) override
Definition gameclient.cpp:1061
CImageAsset LoadAssetFromPath(const char *pPath, bool AsDir, int AssetId, const char *pDirectory) const
Definition assets.cpp:12
void OnReset()
Definition gameclient.cpp:613
bool IsMultiViewIdSet()
Definition multiview.cpp:275
void OnPredict() override
Definition gameclient.cpp:2615
std::vector< class CComponent * > m_vpAll
Definition gameclient.h:200
class IFavorites * Favorites() const
Definition gameclient.h:293
int LastRaceTick() const
Definition gameclient.cpp:910
virtual void OnStartGame()
Definition gameclient.cpp:1330
void OnConnected() override
Definition gameclient.cpp:573
void UpdatePositions()
Definition gameclient.cpp:726
void RenderShutdownMessage() override
Definition gameclient.cpp:1385
static void ConchainSpecialDummy(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData)
Definition gameclient.cpp:3376
CCamera m_Camera
Definition gameclient.h:154
bool m_MultiViewShowHud
Definition gameclient.h:912
void OnSaveCodeNetMessage(const CNetMsg_Sv_SaveCode *pMsg)
Definition gameclient.cpp:4425
CGhost m_Ghost
Definition gameclient.h:196
float m_LastDeadzone
Definition gameclient.h:976
CLocalServer m_LocalServer
Definition gameclient.h:197
bool m_aReceivedTuning[NUM_DUMMIES]
Definition gameclient.h:414
@ SERVERMODE_PUREMOD
Definition gameclient.h:330
@ SERVERMODE_PURE
Definition gameclient.h:328
@ SERVERMODE_MOD
Definition gameclient.h:329
class CGameClient::CCursorInfo m_CursorInfo
void UpdateManagedTeeRenderInfos()
Definition gameclient.cpp:4191
void ProcessDemoSnapshot(CSnapshot *pSnap) override
Definition gameclient.cpp:1404
std::vector< CSnapEntities > m_vSnapEntities
Definition gameclient.h:926
CBinds m_Binds
Definition gameclient.h:160
void SendStartInfo7(bool Dummy)
Definition gameclient.cpp:3152
class ITextRender * m_pTextRender
Definition gameclient.h:208
CEmoticon m_Emoticon
Definition gameclient.h:176
void OnInput(const IInput::CEvent &Event)
Definition gameclient.cpp:496
class IConsole * m_pConsole
Definition gameclient.h:213
const char * Version() const override
Definition gameclient.cpp:90
void UpdateLocalTuning()
Definition gameclient.cpp:3444
std::vector< class CComponent * > m_vpInput
Definition gameclient.h:201
class IClient * m_pClient
Definition gameclient.h:209
static void ConchainMenuMap(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData)
Definition gameclient.cpp:4332
static std::function< bool(int, int, int, int)> GetScoreComparator(bool TimeScore, bool ReceivedMillisecondFinishTimes, bool Race7)
Definition gameclient.cpp:2514
CCollision * Collision()
Definition gameclient.h:298
class ISound * m_pSound
Definition gameclient.h:210
CGameSkin m_GameSkin
Definition gameclient.h:832
float m_LastScreenAspect
Definition gameclient.h:975
CParticles m_Particles
Definition gameclient.h:162
CBroadcast m_Broadcast
Definition gameclient.h:158
void OnConsoleInit() override
Definition gameclient.cpp:98
class IDemoRecorder * DemoRecorder(int Recorder) const
Definition gameclient.h:292
static void ConchainLanguageUpdate(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData)
Definition gameclient.cpp:3351
void OnLanguageChange()
Definition gameclient.cpp:1364
const char * NetVersion7() const override
Definition gameclient.cpp:92
static void ConchainRefreshSkins(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData)
Definition gameclient.cpp:4217
virtual void OnGameOver()
Definition gameclient.cpp:1324
CScoreboard m_Scoreboard
Definition gameclient.h:173
class ITextRender * TextRender() const
Definition gameclient.h:290
int m_aExpectingTuningSince[NUM_DUMMIES]
Definition gameclient.h:416
bool Predict() const
Definition gameclient.cpp:1002
bool IsWorldPaused() const
Definition gameclient.cpp:942
int m_aLocalTuneZone[NUM_DUMMIES]
Definition gameclient.h:413
std::bitset< RECORDER_MAX > m_ActiveRecordings
Definition gameclient.h:419
CStatboard m_Statboard
Definition gameclient.h:174
const char * GetItemName(int Type) const override
Definition gameclient.cpp:96
bool m_NewPredictedTick
Definition gameclient.h:323
float m_LastShowDistanceZoom
Definition gameclient.h:973
virtual void OnStartRound()
Definition gameclient.cpp:1337
CMapSounds m_MapSounds
Definition gameclient.h:193
CMotd m_Motd
Definition gameclient.h:157
bool m_aLastActive[MAX_CLIENTS]
Definition gameclient.h:272
static void ConchainSpecialInfoupdate(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData)
Definition gameclient.cpp:3362
void ResetMultiView()
Definition multiview.cpp:14
CGameInfo m_GameInfo
Definition gameclient.h:333
class CLayers * Layers()
Definition gameclient.h:297
vec2 GetSmoothPos(int ClientId)
Definition gameclient.cpp:3986
CNetObjHandler m_NetObjHandler
Definition gameclient.h:202
void InvalidateSnapshot() override
Definition gameclient.cpp:1718
protocol7::CNetObjHandler * GetNetObjHandler7() override
Definition gameclient.cpp:4374
class IInput * m_pInput
Definition gameclient.h:206
static void ConReadyChange7(IConsole::IResult *pResult, void *pUserData)
Definition gameclient.cpp:3344
void OnDummyDisconnect() override
Definition gameclient.cpp:901
int IntersectCharacter(vec2 HookPos, vec2 NewPos, vec2 &NewPos2, int OwnId, vec2 *pPlayerPosition=nullptr)
Definition gameclient.cpp:3391
class IServerBrowser * m_pServerBrowser
Definition gameclient.h:217
void LoadEmoticonsSkin(const char *pPath, bool AsDir=false)
Definition assets.cpp:270
int m_LastRoundStartTick
Definition gameclient.h:241
int NetobjNumCorrections()
Definition gameclient.h:315
CTuningParams m_aTuning[NUM_DUMMIES]
Definition gameclient.h:417
CRenderMap m_RenderMap
Definition gameclient.h:600
int m_LastFlagCarrierBlue
Definition gameclient.h:245
CTuningParams * TuningList()
Definition gameclient.h:971
bool AntiPingGrenade() const
Definition gameclient.cpp:979
void UpdateRenderedCharacters()
Definition gameclient.cpp:3797
void LoadParticlesSkin(const char *pPath, bool AsDir=false)
Definition assets.cpp:302
int CurrentRaceTime() const
Definition gameclient.cpp:915
class IDiscord * m_pDiscord
Definition gameclient.h:221
CRaceDemo m_RaceDemo
Definition gameclient.h:195
CSpectator m_Spectator
Definition gameclient.h:180
CEffects m_Effects
Definition gameclient.h:172
class IEditor * m_pEditor
Definition gameclient.h:218
CGameWorld m_GameWorld
Definition gameclient.h:718
void ProcessEvents()
Definition gameclient.cpp:1439
size_t ComponentCount() const
Definition gameclient.h:606
void HandleLanguageChanged()
Definition gameclient.cpp:1372
bool m_GamePaused
Definition gameclient.h:276
const CTuningParams * GetTuning(int i) const
Definition gameclient.h:714
CGameConsole m_GameConsole
Definition gameclient.h:159
bool m_aDDRaceMsgSent[NUM_DUMMIES]
Definition gameclient.h:929
CParticlesSkin m_ParticlesSkin
Definition gameclient.h:848
virtual void OnFlagGrab(int TeamId)
Definition gameclient.cpp:1348
CGameWorld m_PrevPredictedWorld
Definition gameclient.h:720
CFlow m_Flow
Definition gameclient.h:167
void ForceUpdateConsoleRemoteCompletionSuggestions() override
Definition gameclient.cpp:291
void OnDummySwap() override
Definition gameclient.cpp:507
CLayers m_Layers
Definition gameclient.h:227
bool m_aMultiViewId[MAX_CLIENTS]
Definition gameclient.h:914
void SnapCollectEntities()
Definition gameclient.cpp:4379
void UpdatePrediction()
Definition gameclient.cpp:3522
CExtrasSkin m_ExtrasSkin
Definition gameclient.h:906
void UpdateEditorIngameMoved()
Definition gameclient.cpp:2558
bool IsDemoPlaybackPaused() const
Definition gameclient.cpp:948
CMapLayers m_MapLayersBackground
Definition gameclient.h:188
CControls m_Controls
Definition gameclient.h:171
int m_ServerMode
Definition gameclient.h:332
CClientData m_aClients[MAX_CLIENTS]
Definition gameclient.h:558
int m_aSwitchStateTeam[NUM_DUMMIES]
Definition gameclient.h:964
int m_MapBestTimeMillis
Definition gameclient.h:920
int m_aFlagDropTick[2]
Definition gameclient.h:324
IKernel * Kernel()
Definition gameclient.h:279
int SwitchStateTeam() const
Definition gameclient.cpp:4041
float CalculateMultiViewMultiplier(vec2 TargetPos)
Definition multiview.cpp:287
int m_aExpectingTuningForZone[NUM_DUMMIES]
Definition gameclient.h:415
void CleanMultiViewId(int ClientId)
Definition multiview.cpp:36
int DDNetVersion() const override
Definition gameclient.cpp:93
int m_LastRaceTick
Definition gameclient.h:242
CFreezeBars m_FreezeBars
Definition gameclient.h:184
int m_DemoSpecId
Definition gameclient.h:335
class IClient * Client() const
Definition gameclient.h:282
const IMap * Map() const override
Definition gameclient.h:733
class IFavorites * m_pFavorites
Definition gameclient.h:216
void CleanMultiViewIds()
Definition multiview.cpp:280
class IFriends * m_pFoes
Definition gameclient.h:220
CPlayers m_Players
Definition gameclient.h:182
int m_aEnableSpectatorCount[NUM_DUMMIES]
Definition gameclient.h:931
int MinTeamSize() const
Definition gameclient.cpp:930
class ISound * Sound() const
Definition gameclient.h:284
CTouchControls m_TouchControls
Definition gameclient.h:178
void SendKill() const
Definition gameclient.cpp:3311
CNetObj_PlayerInput m_HammerInput
Definition gameclient.h:687
const std::vector< CSnapEntities > & SnapEntities()
Definition gameclient.h:908
CClientStats m_aStats[MAX_CLIENTS]
Definition gameclient.h:597
static void ConTeam(IConsole::IResult *pResult, void *pUserData)
Definition gameclient.cpp:3334
class CRenderMap * RenderMap()
Definition gameclient.h:296
bool IsTeamPlay() const
Definition gameclient.cpp:924
CMapLayers m_MapLayersForeground
Definition gameclient.h:189
std::vector< SSwitchers > & PredSwitchers()
Definition gameclient.h:723
CMapImages m_MapImages
Definition gameclient.h:186
static void ConTuneZone(IConsole::IResult *pResult, void *pUserData)
Definition gameclient.cpp:4301
vec2 m_LocalCharacterPos
Definition gameclient.h:337
CItems m_Items
Definition gameclient.h:185
const char * NetVersion() const override
Definition gameclient.cpp:91
std::shared_ptr< CManagedTeeRenderInfo > CreateManagedTeeRenderInfo(const CTeeRenderInfo &TeeRenderInfo, const CSkinDescriptor &SkinDescriptor)
Definition gameclient.cpp:4178
bool IsLocalCharSuper() const
Definition gameclient.cpp:4052
ColorRGBA GetDDTeamColor(int DDTeam, float Lightness=0.5f) const
Definition gameclient.cpp:1020
bool IsOtherTeam(int ClientId) const
Definition gameclient.cpp:4012
void LoadHudSkin(const char *pPath, bool AsDir=false)
Definition assets.cpp:360
CUi m_UI
Definition gameclient.h:229
class CConfig * m_pConfig
Definition gameclient.h:212
CImportantAlert m_ImportantAlert
Definition gameclient.h:169
void OnWindowResize() override
Definition gameclient.cpp:1356
int FindFirstMultiViewId()
Definition multiview.cpp:25
CMapBugs m_MapBugs
Definition gameclient.h:967
SMultiView m_MultiView
Definition gameclient.h:1001
void FormatClientId(int ClientId, char(&aClientId)[16], EClientIdFormat Format) const
Definition gameclient.cpp:1028
CEmoticonsSkin m_EmoticonsSkin
Definition gameclient.h:856
void SendReadyChange7()
Definition gameclient.cpp:3323
void OnRconType(bool UsernameReq) override
Definition gameclient.cpp:1429
void OnSkinUpdate(const char *pSkinName)
Definition gameclient.cpp:4135
void * TranslateGameMsg(int *pMsgId, CUnpacker *pUnpacker, int Conn)
Definition sixup_translate_game.cpp:175
int m_aShowOthers[NUM_DUMMIES]
Definition gameclient.h:930
bool m_LastDummyConnected
Definition gameclient.h:978
void CollectManagedTeeRenderInfos(const std::function< void(const char *pSkinName)> &ActiveSkinAcceptor)
Definition gameclient.cpp:4206
class IInput * Input() const
Definition gameclient.h:285
void Echo(const char *pString) override
Definition gameclient.cpp:4007
protocol7::CNetObjHandler m_NetObjHandler7
Definition gameclient.h:203
CDamageInd m_DamageInd
Definition gameclient.h:177
CGameWorld m_PredictedWorld
Definition gameclient.h:719
void HandleMultiView()
Definition multiview.cpp:155
class CUi * Ui()
Definition gameclient.h:283
int m_aLastUpdateTick[MAX_CLIENTS]
Definition gameclient.h:957
bool InitMultiView(int Team)
Definition multiview.cpp:46
class IDemoPlayer * m_pDemoPlayer
Definition gameclient.h:215
void StoreSave(const char *pTeamMembers, const char *pGeneratedCode) const
Definition gameclient.cpp:4498
int m_EditorMovementDelay
Definition gameclient.h:235
CVoting m_Voting
Definition gameclient.h:179
void ApplySkin7InfoFromGameMsg(const T *pMsg, int ClientId, int Conn)
Definition sixup_translate_game.cpp:90
CMenus m_Menus
Definition gameclient.h:163
CBackground m_Background
Definition gameclient.h:190
void ApplySkin7InfoFromSnapObj(const protocol7::CNetObj_De_ClientInfo *pObj, int ClientId) override
Definition sixup_translate_game.cpp:105
int OnDemoRecSnap7(CSnapshot *pFrom, CSnapshotBuffer *pTo, int Conn) override
Definition sixup_translate_snapshot.cpp:439
class IFriends * m_pFriends
Definition gameclient.h:219
bool m_ReceivedDDNetPlayerFinishTimes
Definition gameclient.h:690
class IHttp * m_pHttp
Definition gameclient.h:225
class IStorage * Storage() const
Definition gameclient.h:286
void OnShutdown() override
Definition gameclient.cpp:1312
void LoadExtrasSkin(const char *pPath, bool AsDir=false)
Definition assets.cpp:449
std::vector< std::shared_ptr< CManagedTeeRenderInfo > > m_vpManagedTeeRenderInfos
Definition gameclient.h:946
class IEngine * m_pEngine
Definition gameclient.h:205
int ClientVersion7() const override
Definition gameclient.cpp:95
bool m_ReceivedDDNetPlayerFinishTimesMillis
Definition gameclient.h:691
void OnUpdate() override
Definition gameclient.cpp:449
bool m_LanguageChanged
Definition gameclient.h:641
CNetObjHandler * GetNetObjHandler() override
Definition gameclient.cpp:4369
bool m_MultiViewActivated
Definition gameclient.h:913
CHudSkin m_HudSkin
Definition gameclient.h:894
class IFriends * Foes()
Definition gameclient.h:303
CRaceHelper m_RaceHelper
Definition gameclient.h:230
class IConfigManager * ConfigManager() const
Definition gameclient.h:287
int m_aLastNewPredictedTick[NUM_DUMMIES]
Definition gameclient.h:239
CTuningParams m_aTuningList[TuneZone::NUM]
Definition gameclient.h:970
bool m_ReceivedDDNetPlayer
Definition gameclient.h:689
CCharOrder m_CharOrder
Definition gameclient.h:963
void ApplyPreInputs(int Tick, bool Direct, CGameWorld &GameWorld)
Definition gameclient.cpp:2575
class IGraphics * m_pGraphics
Definition gameclient.h:207
class IHttp * Http()
Definition gameclient.h:310
std::vector< SSwitchers > & Switchers()
Definition gameclient.h:722
std::unique_ptr< IMap > m_pMap
Definition gameclient.h:924
CMenuBackground m_MenuBackground
Definition gameclient.h:191
bool PredictDummy() const
Definition gameclient.cpp:1011
void OnNewSnapshot(bool DummySwapped) override
Definition gameclient.cpp:1727
int m_aLocalIds[NUM_DUMMIES]
Definition gameclient.h:685
static void ConchainRefreshEventSkins(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData)
Definition gameclient.cpp:4227
void LoadMapSettings()
Definition gameclient.cpp:4243
int MaxTeamSize() const
Definition gameclient.cpp:936
int OnSnapInput(int *pData, bool Dummy, bool Force) override
Definition gameclient.cpp:521
class CRenderTools * RenderTools()
Definition gameclient.h:295
float MapValue(float MaxValue, float MinValue, float MaxRange, float MinRange, float Value)
Definition multiview.cpp:336
static void ConKill(IConsole::IResult *pResult, void *pUserData)
Definition gameclient.cpp:3339
void OnEnterGame() override
Definition gameclient.cpp:1320
CChat m_Chat
Definition gameclient.h:155
CCharacterCore m_PredictedPrevChar
Definition gameclient.h:343
CCensor m_Censor
Definition gameclient.h:156
class IFriends * Friends()
Definition gameclient.h:302
virtual void OnRelease()
Definition gameclient.cpp:1054
void SendInfo(bool Start)
Definition gameclient.cpp:3227
Definition console.h:26
Definition gameclient.h:78
bool m_BugDDRaceGhost
Definition gameclient.h:91
bool m_EntitiesFNG
Definition gameclient.h:104
bool m_AllowZoom
Definition gameclient.h:89
bool m_AllowXSkins
Definition gameclient.h:113
bool m_OldLaser
Definition gameclient.h:126
bool m_EntitiesRace
Definition gameclient.h:103
bool m_AllowHookColl
Definition gameclient.h:88
bool m_NoWeakHookAndBounce
Definition gameclient.h:119
bool m_DDRaceTeam
Definition gameclient.h:122
bool m_PredictDDRace
Definition gameclient.h:97
bool m_FlagStartsRace
Definition gameclient.h:80
bool m_PredictEvents
Definition gameclient.h:124
bool m_DDRaceRecordMessage
Definition gameclient.h:83
bool m_EntitiesFDDrace
Definition gameclient.h:107
bool m_EntitiesDDNet
Definition gameclient.h:101
bool m_PredictVanilla
Definition gameclient.h:99
bool m_RaceRecordMessage
Definition gameclient.h:84
bool m_AllowEyeWheel
Definition gameclient.h:87
bool m_PredictFNG
Definition gameclient.h:96
int m_MaxTeamSize
Definition gameclient.h:130
int m_MinTeamSize
Definition gameclient.h:129
bool m_HudAmmo
Definition gameclient.h:116
bool m_RaceSounds
Definition gameclient.h:85
bool m_HudHealthArmor
Definition gameclient.h:115
bool m_EntitiesVanilla
Definition gameclient.h:105
bool m_EntitiesBW
Definition gameclient.h:106
bool m_PredictDDRaceTiles
Definition gameclient.h:98
bool m_TimeScore
Definition gameclient.h:81
bool m_EntitiesDDRace
Definition gameclient.h:102
int m_NumDDRaceTeams
Definition gameclient.h:132
bool m_DontMaskEntities
Definition gameclient.h:112
bool m_BugFNGLaserRange
Definition gameclient.h:93
bool m_HudDDRace
Definition gameclient.h:117
bool m_BugDDRaceInput
Definition gameclient.h:92
bool m_Pvp
Definition gameclient.h:110
bool m_UnlimitedAmmo
Definition gameclient.h:82
bool m_Race
Definition gameclient.h:109
bool m_NoSkinChangeForFrozen
Definition gameclient.h:120
bool m_BugVanillaBounce
Definition gameclient.h:94
Definition gameworld.h:18
CWorldCore m_Core
Definition gameworld.h:35
Definition ghost.h:51
Definition hud.h:46
Definition image.h:12
uint8_t * m_pData
Definition image.h:76
Definition important_alert.h:15
Definition infomessages.h:10
Definition items.h:17
Definition key_binder.h:12
Definition layers.h:13
Definition local_server.h:13
Definition mapbugs.h:22
Definition mapimages.h:37
Definition maplayers.h:16
Definition mapsounds.h:12
Definition menu_background.h:27
Definition menus.h:34
Definition motd.h:16
Definition nameplates.h:12
Definition particles.h:65
Definition players.h:11
Definition race_demo.h:11
Definition race.h:9
Definition render_map.h:70
Definition render.h:211
Definition scoreboard.h:14
Definition render.h:33
Definition skins7.h:22
Definition skins.h:25
Definition gameclient.h:136
const CNetObj_EntityEx * m_pDataEx
Definition gameclient.h:139
IClient::CSnapItem m_Item
Definition gameclient.h:138
Definition snapshot.h:74
Definition snapshot.h:29
@ MAX_ITEMS
Definition snapshot.h:48
Definition sounds.h:24
Definition spectator.h:13
Definition statboard.h:11
Definition teamscore.h:26
Definition render.h:65
Definition touch_controls.h:24
Definition gamecore.h:42
Definition ui.h:340
Definition packer.h:54
Definition voting.h:14
std::vector< SSwitchers > m_vSwitchers
Definition gamecore.h:176
Definition color.h:146
Definition color.h:183
Definition gameworld_test.cpp:46
Definition client.h:115
Definition client.h:42
virtual class IDemoRecorder * DemoRecorder(int Recorder)=0
Definition config.h:9
Definition console.h:66
Definition console.h:22
void(*) FCommandCallback(IResult *pResult, void *pUserData)
Definition console.h:107
Definition demo.h:64
Definition demo.h:107
Definition discord.h:11
Definition editor.h:8
Definition engine.h:15
Definition favorites.h:15
Definition friends.h:19
Definition client.h:399
Definition graphics.h:261
bool IsValid() const
Definition graphics.h:271
Definition graphics.h:240
Definition http.h:256
Definition input.h:22
Definition input.h:18
IKernel * Kernel()
Definition kernel.h:16
Definition kernel.h:34
Definition map.h:20
Definition serverbrowser.h:280
Definition sound.h:12
Definition storage.h:21
Definition textrender.h:194
Definition updater.h:7
@ NUM_DUMMIES
Definition enums.h:8
ColorRGBA CalculateNameColor(ColorHSLA TextColorHSL)
Definition gameclient.cpp:3439
EClientIdFormat
Definition gameclient.h:143
@ INDENT_AUTO
Definition gameclient.h:145
@ NO_INDENT
Definition gameclient.h:144
@ INDENT_FORCE
Definition gameclient.h:146
constexpr auto IO_MAX_PATH_LENGTH
Definition types.h:26
constexpr int NUM
Definition protocol.h:184
@ MAX_SKIN_LENGTH
Definition protocol7.h:73
@ MAX_CLAN_LENGTH
Definition protocol.h:110
@ MAX_CLIENTS
Definition protocol.h:89
@ MAX_SKIN_LENGTH
Definition protocol.h:111
@ MAX_NAME_LENGTH
Definition protocol.h:109
@ RENDERTYPE_BACKGROUND
Definition render_interfaces.h:16
@ RENDERTYPE_FOREGROUND
Definition render_interfaces.h:18
Definition gameclient.h:989
bool m_IsInit
Definition gameclient.h:991
bool m_Teleported
Definition gameclient.h:992
float m_aLastFreeze[MAX_CLIENTS]
Definition gameclient.h:998
bool m_Solo
Definition gameclient.h:990
vec2 m_OldPos
Definition gameclient.h:994
int m_OldPersonalZoom
Definition gameclient.h:995
float m_SecondChance
Definition gameclient.h:996
bool m_aVanish[MAX_CLIENTS]
Definition gameclient.h:993
float m_OldCameraDistance
Definition gameclient.h:997
vector2_base< float > vec2
Definition vmath.h:168