2010-11-20 10:37:14 +00:00
|
|
|
/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
|
|
|
|
/* If you are missing that file, acquire a complete release at teeworlds.com. */
|
2010-05-29 07:25:38 +00:00
|
|
|
#ifndef GAME_CLIENT_GAMECLIENT_H
|
|
|
|
#define GAME_CLIENT_GAMECLIENT_H
|
|
|
|
|
2020-09-26 19:41:58 +00:00
|
|
|
#include "render.h"
|
2019-04-21 16:20:53 +00:00
|
|
|
#include <base/color.h>
|
2010-05-29 07:25:38 +00:00
|
|
|
#include <base/vmath.h>
|
|
|
|
#include <engine/client.h>
|
|
|
|
#include <engine/console.h>
|
2020-02-19 10:24:58 +00:00
|
|
|
#include <engine/shared/config.h>
|
2022-06-16 16:06:35 +00:00
|
|
|
|
|
|
|
#include <game/collision.h>
|
2020-09-26 19:41:58 +00:00
|
|
|
#include <game/gamecore.h>
|
2010-05-29 07:25:38 +00:00
|
|
|
#include <game/layers.h>
|
2011-04-09 06:41:31 +00:00
|
|
|
#include <game/teamscore.h>
|
|
|
|
|
2020-09-26 19:41:58 +00:00
|
|
|
#include <game/client/prediction/gameworld.h>
|
2019-04-11 22:46:54 +00:00
|
|
|
|
2021-07-12 09:29:59 +00:00
|
|
|
// components
|
|
|
|
#include "components/background.h"
|
|
|
|
#include "components/binds.h"
|
|
|
|
#include "components/broadcast.h"
|
|
|
|
#include "components/camera.h"
|
|
|
|
#include "components/chat.h"
|
|
|
|
#include "components/console.h"
|
|
|
|
#include "components/controls.h"
|
|
|
|
#include "components/countryflags.h"
|
|
|
|
#include "components/damageind.h"
|
|
|
|
#include "components/debughud.h"
|
|
|
|
#include "components/effects.h"
|
|
|
|
#include "components/emoticon.h"
|
|
|
|
#include "components/flow.h"
|
2022-03-25 11:54:11 +00:00
|
|
|
#include "components/freezebars.h"
|
2021-07-12 09:29:59 +00:00
|
|
|
#include "components/ghost.h"
|
|
|
|
#include "components/hud.h"
|
|
|
|
#include "components/items.h"
|
|
|
|
#include "components/killmessages.h"
|
|
|
|
#include "components/mapimages.h"
|
|
|
|
#include "components/maplayers.h"
|
|
|
|
#include "components/mapsounds.h"
|
|
|
|
#include "components/menu_background.h"
|
|
|
|
#include "components/menus.h"
|
|
|
|
#include "components/motd.h"
|
|
|
|
#include "components/nameplates.h"
|
|
|
|
#include "components/particles.h"
|
|
|
|
#include "components/players.h"
|
|
|
|
#include "components/race_demo.h"
|
|
|
|
#include "components/scoreboard.h"
|
|
|
|
#include "components/skins.h"
|
|
|
|
#include "components/sounds.h"
|
|
|
|
#include "components/spectator.h"
|
|
|
|
#include "components/statboard.h"
|
2022-04-18 07:34:05 +00:00
|
|
|
#include "components/tooltips.h"
|
2021-07-12 09:29:59 +00:00
|
|
|
#include "components/voting.h"
|
|
|
|
|
2019-06-03 19:52:14 +00:00
|
|
|
class CGameInfo
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
bool m_FlagStartsRace;
|
|
|
|
bool m_TimeScore;
|
|
|
|
bool m_UnlimitedAmmo;
|
|
|
|
bool m_DDRaceRecordMessage;
|
|
|
|
bool m_RaceRecordMessage;
|
2022-02-22 21:31:16 +00:00
|
|
|
bool m_RaceSounds;
|
2019-06-03 19:52:14 +00:00
|
|
|
|
|
|
|
bool m_AllowEyeWheel;
|
|
|
|
bool m_AllowHookColl;
|
|
|
|
bool m_AllowZoom;
|
|
|
|
|
|
|
|
bool m_BugDDRaceGhost;
|
|
|
|
bool m_BugDDRaceInput;
|
|
|
|
bool m_BugFNGLaserRange;
|
|
|
|
bool m_BugVanillaBounce;
|
|
|
|
|
|
|
|
bool m_PredictFNG;
|
|
|
|
bool m_PredictDDRace;
|
|
|
|
bool m_PredictDDRaceTiles;
|
|
|
|
bool m_PredictVanilla;
|
|
|
|
|
|
|
|
bool m_EntitiesDDNet;
|
|
|
|
bool m_EntitiesDDRace;
|
|
|
|
bool m_EntitiesRace;
|
|
|
|
bool m_EntitiesFNG;
|
|
|
|
bool m_EntitiesVanilla;
|
2020-05-19 14:49:28 +00:00
|
|
|
bool m_EntitiesBW;
|
2020-12-21 15:45:19 +00:00
|
|
|
bool m_EntitiesFDDrace;
|
2019-07-19 08:21:32 +00:00
|
|
|
|
|
|
|
bool m_Race;
|
2019-07-31 19:22:11 +00:00
|
|
|
|
|
|
|
bool m_DontMaskEntities;
|
2020-09-24 09:38:27 +00:00
|
|
|
bool m_AllowXSkins;
|
2022-06-15 19:10:51 +00:00
|
|
|
|
|
|
|
bool m_HudHealthArmor;
|
|
|
|
bool m_HudAmmo;
|
|
|
|
bool m_HudDDRace;
|
2019-06-03 19:52:14 +00:00
|
|
|
};
|
|
|
|
|
2021-10-21 01:18:54 +00:00
|
|
|
class CSnapEntities
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
IClient::CSnapItem m_Item;
|
|
|
|
const void *m_pData;
|
|
|
|
const CNetObj_EntityEx *m_pDataEx;
|
|
|
|
};
|
|
|
|
|
2010-05-29 07:25:38 +00:00
|
|
|
class CGameClient : public IGameClient
|
|
|
|
{
|
2021-07-12 09:29:59 +00:00
|
|
|
public:
|
|
|
|
// all components
|
|
|
|
CKillMessages m_KillMessages;
|
|
|
|
CCamera m_Camera;
|
|
|
|
CChat m_Chat;
|
|
|
|
CMotd m_Motd;
|
|
|
|
CBroadcast m_Broadcast;
|
|
|
|
CGameConsole m_GameConsole;
|
|
|
|
CBinds m_Binds;
|
|
|
|
CParticles m_Particles;
|
|
|
|
CMenus m_Menus;
|
|
|
|
CSkins m_Skins;
|
|
|
|
CCountryFlags m_CountryFlags;
|
|
|
|
CFlow m_Flow;
|
|
|
|
CHud m_Hud;
|
|
|
|
CDebugHud m_DebugHud;
|
|
|
|
CControls m_Controls;
|
|
|
|
CEffects m_Effects;
|
|
|
|
CScoreboard m_Scoreboard;
|
|
|
|
CStatboard m_Statboard;
|
|
|
|
CSounds m_Sounds;
|
|
|
|
CEmoticon m_Emoticon;
|
|
|
|
CDamageInd m_DamageInd;
|
|
|
|
CVoting m_Voting;
|
|
|
|
CSpectator m_Spectator;
|
|
|
|
|
|
|
|
CPlayers m_Players;
|
|
|
|
CNamePlates m_NamePlates;
|
2022-03-25 11:54:11 +00:00
|
|
|
CFreezeBars m_FreezeBars;
|
2021-07-12 09:29:59 +00:00
|
|
|
CItems m_Items;
|
|
|
|
CMapImages m_MapImages;
|
|
|
|
|
|
|
|
CMapLayers m_MapLayersBackGround = CMapLayers{CMapLayers::TYPE_BACKGROUND};
|
|
|
|
CMapLayers m_MapLayersForeGround = CMapLayers{CMapLayers::TYPE_FOREGROUND};
|
|
|
|
CBackground m_BackGround;
|
|
|
|
CMenuBackground m_MenuBackground;
|
|
|
|
|
|
|
|
CMapSounds m_MapSounds;
|
|
|
|
|
|
|
|
CRaceDemo m_RaceDemo;
|
|
|
|
CGhost m_Ghost;
|
|
|
|
|
2022-04-18 07:34:05 +00:00
|
|
|
CTooltips m_Tooltips;
|
|
|
|
|
2021-07-12 09:29:59 +00:00
|
|
|
private:
|
2022-06-01 11:54:36 +00:00
|
|
|
std::vector<class CComponent *> m_vpAll;
|
|
|
|
std::vector<class CComponent *> m_vpInput;
|
2010-05-29 07:25:38 +00:00
|
|
|
CNetObjHandler m_NetObjHandler;
|
2011-04-13 18:37:12 +00:00
|
|
|
|
2011-02-27 16:56:03 +00:00
|
|
|
class IEngine *m_pEngine;
|
2010-05-29 07:25:38 +00:00
|
|
|
class IInput *m_pInput;
|
|
|
|
class IGraphics *m_pGraphics;
|
|
|
|
class ITextRender *m_pTextRender;
|
|
|
|
class IClient *m_pClient;
|
|
|
|
class ISound *m_pSound;
|
2021-01-10 12:47:07 +00:00
|
|
|
class CConfig *m_pConfig;
|
2010-05-29 07:25:38 +00:00
|
|
|
class IConsole *m_pConsole;
|
|
|
|
class IStorage *m_pStorage;
|
|
|
|
class IDemoPlayer *m_pDemoPlayer;
|
|
|
|
class IServerBrowser *m_pServerBrowser;
|
2011-03-21 23:31:42 +00:00
|
|
|
class IEditor *m_pEditor;
|
2011-03-23 12:06:35 +00:00
|
|
|
class IFriends *m_pFriends;
|
2015-07-22 20:16:49 +00:00
|
|
|
class IFriends *m_pFoes;
|
2020-07-09 22:01:00 +00:00
|
|
|
#if defined(CONF_AUTOUPDATE)
|
2015-04-18 19:17:27 +00:00
|
|
|
class IUpdater *m_pUpdater;
|
2020-07-09 22:01:00 +00:00
|
|
|
#endif
|
2011-04-13 18:37:12 +00:00
|
|
|
|
2010-05-29 07:25:38 +00:00
|
|
|
CLayers m_Layers;
|
2022-06-16 16:06:35 +00:00
|
|
|
CCollision m_Collision;
|
2010-05-29 07:25:38 +00:00
|
|
|
CUI m_UI;
|
2011-04-13 18:37:12 +00:00
|
|
|
|
2010-05-29 07:25:38 +00:00
|
|
|
void ProcessEvents();
|
2011-03-10 09:08:14 +00:00
|
|
|
void UpdatePositions();
|
2010-05-29 07:25:38 +00:00
|
|
|
|
|
|
|
int m_PredictedTick;
|
2020-10-18 14:51:26 +00:00
|
|
|
int m_LastNewPredictedTick[NUM_DUMMIES];
|
2010-05-29 07:25:38 +00:00
|
|
|
|
2015-05-20 20:23:58 +00:00
|
|
|
int m_LastRoundStartTick;
|
|
|
|
|
|
|
|
int m_LastFlagCarrierRed;
|
|
|
|
int m_LastFlagCarrierBlue;
|
|
|
|
|
2020-10-18 14:51:26 +00:00
|
|
|
int m_CheckInfo[NUM_DUMMIES];
|
2011-01-06 03:46:10 +00:00
|
|
|
|
2020-05-22 15:58:41 +00:00
|
|
|
char m_aDDNetVersionStr[64];
|
|
|
|
|
2011-08-13 00:11:06 +00:00
|
|
|
static void ConTeam(IConsole::IResult *pResult, void *pUserData);
|
|
|
|
static void ConKill(IConsole::IResult *pResult, void *pUserData);
|
2011-04-13 18:37:12 +00:00
|
|
|
|
2010-05-29 07:25:38 +00:00
|
|
|
static void ConchainSpecialInfoupdate(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData);
|
2014-04-28 13:19:57 +00:00
|
|
|
static void ConchainSpecialDummyInfoupdate(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData);
|
2014-04-28 13:34:56 +00:00
|
|
|
static void ConchainSpecialDummy(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData);
|
2019-05-06 12:19:10 +00:00
|
|
|
static void ConchainClTextEntitiesSize(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData);
|
2011-04-13 18:37:12 +00:00
|
|
|
|
2019-09-08 22:53:07 +00:00
|
|
|
static void ConTuneZone(IConsole::IResult *pResult, void *pUserData);
|
|
|
|
|
2020-09-18 16:45:42 +00:00
|
|
|
static void ConchainMenuMap(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData);
|
|
|
|
|
2010-05-29 07:25:38 +00:00
|
|
|
public:
|
|
|
|
IKernel *Kernel() { return IInterface::Kernel(); }
|
2011-02-27 16:56:03 +00:00
|
|
|
IEngine *Engine() const { return m_pEngine; }
|
2010-05-29 07:25:38 +00:00
|
|
|
class IGraphics *Graphics() const { return m_pGraphics; }
|
|
|
|
class IClient *Client() const { return m_pClient; }
|
|
|
|
class CUI *UI() { return &m_UI; }
|
|
|
|
class ISound *Sound() const { return m_pSound; }
|
|
|
|
class IInput *Input() const { return m_pInput; }
|
|
|
|
class IStorage *Storage() const { return m_pStorage; }
|
2021-01-10 12:47:07 +00:00
|
|
|
class CConfig *Config() const { return m_pConfig; }
|
2010-05-29 07:25:38 +00:00
|
|
|
class IConsole *Console() { return m_pConsole; }
|
|
|
|
class ITextRender *TextRender() const { return m_pTextRender; }
|
|
|
|
class IDemoPlayer *DemoPlayer() const { return m_pDemoPlayer; }
|
2014-10-16 15:42:13 +00:00
|
|
|
class IDemoRecorder *DemoRecorder(int Recorder) const { return Client()->DemoRecorder(Recorder); }
|
2010-05-29 07:25:38 +00:00
|
|
|
class IServerBrowser *ServerBrowser() const { return m_pServerBrowser; }
|
|
|
|
class CRenderTools *RenderTools() { return &m_RenderTools; }
|
2022-03-08 19:01:26 +00:00
|
|
|
class CLayers *Layers() { return &m_Layers; }
|
2022-06-16 16:06:35 +00:00
|
|
|
CCollision *Collision() { return &m_Collision; }
|
2011-03-21 23:31:42 +00:00
|
|
|
class IEditor *Editor() { return m_pEditor; }
|
2011-03-23 12:06:35 +00:00
|
|
|
class IFriends *Friends() { return m_pFriends; }
|
2015-07-22 20:16:49 +00:00
|
|
|
class IFriends *Foes() { return m_pFoes; }
|
2020-07-09 22:01:00 +00:00
|
|
|
#if defined(CONF_AUTOUPDATE)
|
2020-09-26 19:41:58 +00:00
|
|
|
class IUpdater *Updater()
|
|
|
|
{
|
|
|
|
return m_pUpdater;
|
|
|
|
}
|
2020-07-09 22:01:00 +00:00
|
|
|
#endif
|
2011-04-13 18:37:12 +00:00
|
|
|
|
2020-09-26 19:41:58 +00:00
|
|
|
int NetobjNumCorrections()
|
|
|
|
{
|
|
|
|
return m_NetObjHandler.NumObjCorrections();
|
|
|
|
}
|
2010-08-13 01:07:51 +00:00
|
|
|
const char *NetobjCorrectedOn() { return m_NetObjHandler.CorrectedObjOn(); }
|
2010-05-29 07:25:38 +00:00
|
|
|
|
|
|
|
bool m_SuppressEvents;
|
|
|
|
bool m_NewTick;
|
|
|
|
bool m_NewPredictedTick;
|
2011-07-05 21:15:24 +00:00
|
|
|
int m_FlagDropTick[2];
|
2010-05-29 07:25:38 +00:00
|
|
|
|
|
|
|
// TODO: move this
|
2020-10-18 14:51:26 +00:00
|
|
|
CTuningParams m_Tuning[NUM_DUMMIES];
|
2011-04-13 18:37:12 +00:00
|
|
|
|
2010-05-29 07:25:38 +00:00
|
|
|
enum
|
|
|
|
{
|
2020-09-26 19:41:58 +00:00
|
|
|
SERVERMODE_PURE = 0,
|
2010-05-29 07:25:38 +00:00
|
|
|
SERVERMODE_MOD,
|
|
|
|
SERVERMODE_PUREMOD,
|
|
|
|
};
|
|
|
|
int m_ServerMode;
|
2019-06-03 19:52:14 +00:00
|
|
|
CGameInfo m_GameInfo;
|
2010-05-29 07:25:38 +00:00
|
|
|
|
2011-03-12 17:07:57 +00:00
|
|
|
int m_DemoSpecID;
|
|
|
|
|
2010-05-29 07:25:38 +00:00
|
|
|
vec2 m_LocalCharacterPos;
|
|
|
|
|
|
|
|
// predicted players
|
|
|
|
CCharacterCore m_PredictedPrevChar;
|
|
|
|
CCharacterCore m_PredictedChar;
|
|
|
|
|
|
|
|
// snap pointers
|
|
|
|
struct CSnapState
|
|
|
|
{
|
|
|
|
const CNetObj_Character *m_pLocalCharacter;
|
|
|
|
const CNetObj_Character *m_pLocalPrevCharacter;
|
|
|
|
const CNetObj_PlayerInfo *m_pLocalInfo;
|
2011-03-10 09:08:14 +00:00
|
|
|
const CNetObj_SpectatorInfo *m_pSpectatorInfo;
|
|
|
|
const CNetObj_SpectatorInfo *m_pPrevSpectatorInfo;
|
2010-05-29 07:25:38 +00:00
|
|
|
const CNetObj_Flag *m_paFlags[2];
|
2011-03-04 16:08:10 +00:00
|
|
|
const CNetObj_GameInfo *m_pGameInfoObj;
|
|
|
|
const CNetObj_GameData *m_pGameDataObj;
|
|
|
|
int m_GameDataSnapID;
|
2010-05-29 07:25:38 +00:00
|
|
|
|
|
|
|
const CNetObj_PlayerInfo *m_paPlayerInfos[MAX_CLIENTS];
|
|
|
|
const CNetObj_PlayerInfo *m_paInfoByScore[MAX_CLIENTS];
|
2014-02-08 21:24:57 +00:00
|
|
|
const CNetObj_PlayerInfo *m_paInfoByName[MAX_CLIENTS];
|
2020-09-13 19:20:13 +00:00
|
|
|
const CNetObj_PlayerInfo *m_paInfoByDDTeamScore[MAX_CLIENTS];
|
|
|
|
const CNetObj_PlayerInfo *m_paInfoByDDTeamName[MAX_CLIENTS];
|
2011-04-13 18:37:12 +00:00
|
|
|
|
2011-02-12 10:40:36 +00:00
|
|
|
int m_LocalClientID;
|
2010-05-29 07:25:38 +00:00
|
|
|
int m_NumPlayers;
|
|
|
|
int m_aTeamSize[2];
|
2011-04-13 18:37:12 +00:00
|
|
|
|
2011-03-12 17:07:57 +00:00
|
|
|
// spectate data
|
|
|
|
struct CSpectateInfo
|
|
|
|
{
|
|
|
|
bool m_Active;
|
|
|
|
int m_SpectatorID;
|
|
|
|
bool m_UsePosition;
|
|
|
|
vec2 m_Position;
|
|
|
|
} m_SpecInfo;
|
2011-04-13 18:37:12 +00:00
|
|
|
|
2010-05-29 07:25:38 +00:00
|
|
|
//
|
|
|
|
struct CCharacterInfo
|
|
|
|
{
|
|
|
|
bool m_Active;
|
2011-04-13 18:37:12 +00:00
|
|
|
|
2010-05-29 07:25:38 +00:00
|
|
|
// snapshots
|
|
|
|
CNetObj_Character m_Prev;
|
|
|
|
CNetObj_Character m_Cur;
|
2011-04-13 18:37:12 +00:00
|
|
|
|
2019-04-21 22:38:24 +00:00
|
|
|
CNetObj_DDNetCharacter m_ExtendedData;
|
2022-05-24 15:26:49 +00:00
|
|
|
const CNetObj_DDNetCharacter *m_PrevExtendedData;
|
2019-04-21 22:38:24 +00:00
|
|
|
bool m_HasExtendedData;
|
2022-03-27 16:18:53 +00:00
|
|
|
bool m_HasExtendedDisplayInfo;
|
|
|
|
|
2010-05-29 07:25:38 +00:00
|
|
|
// interpolated position
|
|
|
|
vec2 m_Position;
|
|
|
|
};
|
2011-04-13 18:37:12 +00:00
|
|
|
|
2010-05-29 07:25:38 +00:00
|
|
|
CCharacterInfo m_aCharacters[MAX_CLIENTS];
|
|
|
|
};
|
|
|
|
|
|
|
|
CSnapState m_Snap;
|
2021-05-12 16:57:50 +00:00
|
|
|
int m_LocalTuneZone[2];
|
|
|
|
bool m_ReceivedTuning[2];
|
|
|
|
int m_ExpectingTuningForZone[2];
|
|
|
|
int m_ExpectingTuningSince[2];
|
2011-04-13 18:37:12 +00:00
|
|
|
|
2010-05-29 07:25:38 +00:00
|
|
|
// client data
|
|
|
|
struct CClientData
|
|
|
|
{
|
|
|
|
int m_UseCustomColor;
|
|
|
|
int m_ColorBody;
|
|
|
|
int m_ColorFeet;
|
2011-04-13 18:37:12 +00:00
|
|
|
|
2011-03-15 10:23:49 +00:00
|
|
|
char m_aName[MAX_NAME_LENGTH];
|
|
|
|
char m_aClan[MAX_CLAN_LENGTH];
|
|
|
|
int m_Country;
|
2010-05-29 07:25:38 +00:00
|
|
|
char m_aSkinName[64];
|
|
|
|
int m_SkinColor;
|
|
|
|
int m_Team;
|
|
|
|
int m_Emoticon;
|
2021-09-14 22:37:06 +00:00
|
|
|
float m_EmoticonStartFraction;
|
|
|
|
int m_EmoticonStartTick;
|
2019-04-12 14:16:21 +00:00
|
|
|
bool m_Solo;
|
2019-04-19 09:17:28 +00:00
|
|
|
bool m_Jetpack;
|
|
|
|
bool m_NoCollision;
|
|
|
|
bool m_EndlessHook;
|
|
|
|
bool m_EndlessJump;
|
|
|
|
bool m_NoHammerHit;
|
|
|
|
bool m_NoGrenadeHit;
|
2019-11-22 14:37:18 +00:00
|
|
|
bool m_NoLaserHit;
|
2019-04-19 09:17:28 +00:00
|
|
|
bool m_NoShotgunHit;
|
|
|
|
bool m_NoHookHit;
|
|
|
|
bool m_Super;
|
|
|
|
bool m_HasTelegunGun;
|
|
|
|
bool m_HasTelegunGrenade;
|
|
|
|
bool m_HasTelegunLaser;
|
2019-04-23 15:57:26 +00:00
|
|
|
int m_FreezeEnd;
|
2019-04-19 09:17:28 +00:00
|
|
|
bool m_DeepFrozen;
|
2022-01-07 15:53:40 +00:00
|
|
|
bool m_LiveFrozen;
|
2019-04-19 09:17:28 +00:00
|
|
|
|
2010-05-29 07:25:38 +00:00
|
|
|
CCharacterCore m_Predicted;
|
2013-10-09 14:02:23 +00:00
|
|
|
CCharacterCore m_PrevPredicted;
|
2011-04-13 18:37:12 +00:00
|
|
|
|
2010-05-29 07:25:38 +00:00
|
|
|
CTeeRenderInfo m_SkinInfo; // this is what the server reports
|
|
|
|
CTeeRenderInfo m_RenderInfo; // this is what we use
|
2011-04-13 18:37:12 +00:00
|
|
|
|
2010-05-29 07:25:38 +00:00
|
|
|
float m_Angle;
|
2011-03-22 21:41:27 +00:00
|
|
|
bool m_Active;
|
|
|
|
bool m_ChatIgnore;
|
2020-06-26 22:06:07 +00:00
|
|
|
bool m_EmoticonIgnore;
|
2011-03-23 12:06:35 +00:00
|
|
|
bool m_Friend;
|
2015-07-22 20:16:49 +00:00
|
|
|
bool m_Foe;
|
2011-04-13 18:37:12 +00:00
|
|
|
|
2019-03-02 10:50:33 +00:00
|
|
|
int m_AuthLevel;
|
2019-07-13 10:25:54 +00:00
|
|
|
bool m_Afk;
|
2019-08-02 16:16:58 +00:00
|
|
|
bool m_Paused;
|
|
|
|
bool m_Spec;
|
2019-03-02 10:50:33 +00:00
|
|
|
|
2021-08-15 10:53:14 +00:00
|
|
|
// Editor allows 256 switches for now.
|
|
|
|
bool m_SwitchStates[256];
|
|
|
|
|
2019-11-09 21:49:53 +00:00
|
|
|
CNetObj_Character m_Snapped;
|
|
|
|
CNetObj_Character m_Evolved;
|
|
|
|
|
2021-07-12 10:04:45 +00:00
|
|
|
void UpdateRenderInfo(bool IsTeamPlay);
|
2011-03-22 21:41:27 +00:00
|
|
|
void Reset();
|
2011-04-09 06:41:31 +00:00
|
|
|
|
2019-04-11 22:46:54 +00:00
|
|
|
// rendered characters
|
|
|
|
CNetObj_Character m_RenderCur;
|
|
|
|
CNetObj_Character m_RenderPrev;
|
|
|
|
vec2 m_RenderPos;
|
|
|
|
bool m_IsPredicted;
|
|
|
|
bool m_IsPredictedLocal;
|
2021-06-23 05:05:49 +00:00
|
|
|
int64_t m_SmoothStart[2];
|
|
|
|
int64_t m_SmoothLen[2];
|
2019-04-11 22:46:54 +00:00
|
|
|
vec2 m_PredPos[200];
|
|
|
|
int m_PredTick[200];
|
2020-06-25 12:56:23 +00:00
|
|
|
bool m_SpecCharPresent;
|
|
|
|
vec2 m_SpecChar;
|
2010-05-29 07:25:38 +00:00
|
|
|
};
|
2010-09-27 19:41:41 +00:00
|
|
|
|
2010-05-29 07:25:38 +00:00
|
|
|
CClientData m_aClients[MAX_CLIENTS];
|
2011-04-13 18:37:12 +00:00
|
|
|
|
2015-05-19 22:51:02 +00:00
|
|
|
class CClientStats
|
|
|
|
{
|
2017-02-15 15:43:45 +00:00
|
|
|
int m_IngameTicks;
|
|
|
|
int m_JoinTick;
|
|
|
|
bool m_Active;
|
2019-03-02 10:50:33 +00:00
|
|
|
|
2017-02-15 15:43:45 +00:00
|
|
|
public:
|
|
|
|
CClientStats();
|
2015-05-19 22:51:02 +00:00
|
|
|
|
2017-02-15 15:43:45 +00:00
|
|
|
int m_aFragsWith[NUM_WEAPONS];
|
|
|
|
int m_aDeathsFrom[NUM_WEAPONS];
|
|
|
|
int m_Frags;
|
|
|
|
int m_Deaths;
|
|
|
|
int m_Suicides;
|
|
|
|
int m_BestSpree;
|
|
|
|
int m_CurrentSpree;
|
2015-05-19 22:51:02 +00:00
|
|
|
|
2017-02-15 15:43:45 +00:00
|
|
|
int m_FlagGrabs;
|
|
|
|
int m_FlagCaptures;
|
2015-05-19 22:51:02 +00:00
|
|
|
|
2017-02-15 15:43:45 +00:00
|
|
|
void Reset();
|
2019-03-02 10:50:33 +00:00
|
|
|
|
2017-02-15 15:43:45 +00:00
|
|
|
bool IsActive() const { return m_Active; }
|
2020-09-26 19:41:58 +00:00
|
|
|
void JoinGame(int Tick)
|
|
|
|
{
|
|
|
|
m_Active = true;
|
|
|
|
m_JoinTick = Tick;
|
|
|
|
};
|
|
|
|
void JoinSpec(int Tick)
|
|
|
|
{
|
|
|
|
m_Active = false;
|
|
|
|
m_IngameTicks += Tick - m_JoinTick;
|
|
|
|
};
|
2022-03-08 19:01:26 +00:00
|
|
|
int GetIngameTicks(int Tick) const { return m_IngameTicks + Tick - m_JoinTick; }
|
|
|
|
float GetFPM(int Tick, int TickSpeed) const { return (float)(m_Frags * TickSpeed * 60) / GetIngameTicks(Tick); }
|
2015-05-19 22:51:02 +00:00
|
|
|
};
|
|
|
|
|
2015-05-21 12:34:20 +00:00
|
|
|
CClientStats m_aStats[MAX_CLIENTS];
|
2015-05-19 22:51:02 +00:00
|
|
|
|
2010-05-29 07:25:38 +00:00
|
|
|
CRenderTools m_RenderTools;
|
2011-04-13 18:37:12 +00:00
|
|
|
|
2010-05-29 07:25:38 +00:00
|
|
|
void OnReset();
|
|
|
|
|
2022-06-23 17:59:38 +00:00
|
|
|
size_t ComponentCount() { return m_vpAll.size(); }
|
|
|
|
|
2010-05-29 07:25:38 +00:00
|
|
|
// hooks
|
2022-05-17 20:13:44 +00:00
|
|
|
void OnConnected() override;
|
|
|
|
void OnRender() override;
|
|
|
|
void OnUpdate() override;
|
|
|
|
void OnDummyDisconnect() override;
|
2010-09-12 10:43:03 +00:00
|
|
|
virtual void OnRelease();
|
2022-05-17 20:13:44 +00:00
|
|
|
void OnInit() override;
|
|
|
|
void OnConsoleInit() override;
|
|
|
|
void OnStateChange(int NewState, int OldState) override;
|
|
|
|
void OnMessage(int MsgId, CUnpacker *pUnpacker, int Conn, bool Dummy) override;
|
|
|
|
void InvalidateSnapshot() override;
|
|
|
|
void OnNewSnapshot() override;
|
|
|
|
void OnPredict() override;
|
|
|
|
void OnActivateEditor() override;
|
|
|
|
void OnDummySwap() override;
|
|
|
|
int OnSnapInput(int *pData, bool Dummy, bool Force) override;
|
|
|
|
void OnShutdown() override;
|
|
|
|
void OnEnterGame() override;
|
|
|
|
void OnRconType(bool UsernameReq) override;
|
|
|
|
void OnRconLine(const char *pLine) override;
|
2010-12-12 15:48:13 +00:00
|
|
|
virtual void OnGameOver();
|
2011-01-06 22:21:51 +00:00
|
|
|
virtual void OnStartGame();
|
2015-05-20 20:23:58 +00:00
|
|
|
virtual void OnFlagGrab(int TeamID);
|
2011-04-13 18:37:12 +00:00
|
|
|
|
2018-03-21 14:54:51 +00:00
|
|
|
void OnWindowResize();
|
|
|
|
static void OnWindowResizeCB(void *pUser);
|
|
|
|
|
2020-10-12 10:29:47 +00:00
|
|
|
void OnLanguageChange();
|
|
|
|
|
2022-05-17 20:13:44 +00:00
|
|
|
const char *GetItemName(int Type) const override;
|
|
|
|
const char *Version() const override;
|
|
|
|
const char *NetVersion() const override;
|
|
|
|
int DDNetVersion() const override;
|
|
|
|
const char *DDNetVersionStr() const override;
|
2011-04-13 18:37:12 +00:00
|
|
|
|
2010-05-29 07:25:38 +00:00
|
|
|
// actions
|
|
|
|
// TODO: move these
|
|
|
|
void SendSwitchTeam(int Team);
|
|
|
|
void SendInfo(bool Start);
|
2022-05-17 20:13:44 +00:00
|
|
|
void SendDummyInfo(bool Start) override;
|
2011-02-12 10:40:36 +00:00
|
|
|
void SendKill(int ClientID);
|
2011-04-13 18:37:12 +00:00
|
|
|
|
2011-04-09 06:41:31 +00:00
|
|
|
// DDRace
|
2011-02-04 17:25:04 +00:00
|
|
|
|
2020-10-18 14:51:26 +00:00
|
|
|
int m_LocalIDs[NUM_DUMMIES];
|
2017-02-28 09:08:14 +00:00
|
|
|
CNetObj_PlayerInput m_DummyInput;
|
|
|
|
CNetObj_PlayerInput m_HammerInput;
|
2022-04-25 12:10:32 +00:00
|
|
|
unsigned int m_DummyFire;
|
2020-09-05 08:44:50 +00:00
|
|
|
bool m_ReceivedDDNetPlayer;
|
2017-02-28 09:08:14 +00:00
|
|
|
|
2014-01-21 23:08:30 +00:00
|
|
|
class CTeamsCore m_Teams;
|
2011-04-09 06:41:31 +00:00
|
|
|
|
2022-01-22 13:12:59 +00:00
|
|
|
int IntersectCharacter(vec2 HookPos, vec2 NewPos, vec2 &NewPos2, int ownID);
|
2013-08-23 23:50:35 +00:00
|
|
|
|
2022-05-17 20:13:44 +00:00
|
|
|
int GetLastRaceTick() override;
|
2019-03-25 19:02:50 +00:00
|
|
|
|
2021-07-12 10:04:45 +00:00
|
|
|
bool IsTeamPlay() { return m_Snap.m_pGameInfoObj && m_Snap.m_pGameInfoObj->m_GameFlags & GAMEFLAG_TEAMS; }
|
|
|
|
|
2016-05-05 16:57:35 +00:00
|
|
|
bool AntiPingPlayers() { return g_Config.m_ClAntiPing && g_Config.m_ClAntiPingPlayers && !m_Snap.m_SpecInfo.m_Active && Client()->State() != IClient::STATE_DEMOPLAYBACK && (m_Tuning[g_Config.m_ClDummy].m_PlayerCollision || m_Tuning[g_Config.m_ClDummy].m_PlayerHooking); }
|
2016-04-23 23:57:01 +00:00
|
|
|
bool AntiPingGrenade() { return g_Config.m_ClAntiPing && g_Config.m_ClAntiPingGrenade && !m_Snap.m_SpecInfo.m_Active && Client()->State() != IClient::STATE_DEMOPLAYBACK; }
|
|
|
|
bool AntiPingWeapons() { return g_Config.m_ClAntiPing && g_Config.m_ClAntiPingWeapons && !m_Snap.m_SpecInfo.m_Active && Client()->State() != IClient::STATE_DEMOPLAYBACK; }
|
2019-06-19 00:12:57 +00:00
|
|
|
bool AntiPingGunfire() { return AntiPingGrenade() && AntiPingWeapons() && g_Config.m_ClAntiPingGunfire; }
|
2020-09-26 19:41:58 +00:00
|
|
|
bool Predict() { return g_Config.m_ClPredict && !(m_Snap.m_pGameInfoObj && m_Snap.m_pGameInfoObj->m_GameStateFlags & GAMESTATEFLAG_GAMEOVER) && !m_Snap.m_SpecInfo.m_Active && Client()->State() != IClient::STATE_DEMOPLAYBACK && m_Snap.m_pLocalCharacter; }
|
2021-01-18 22:55:13 +00:00
|
|
|
bool PredictDummy() { return g_Config.m_ClPredictDummy && Client()->DummyConnected() && m_Snap.m_LocalClientID >= 0 && m_PredictedDummyID >= 0 && !m_aClients[m_PredictedDummyID].m_Paused; }
|
2021-04-23 03:01:38 +00:00
|
|
|
CTuningParams GetTunes(int i) { return m_aTuningList[i]; }
|
2019-04-11 22:46:54 +00:00
|
|
|
|
2019-04-13 22:54:29 +00:00
|
|
|
CGameWorld m_GameWorld;
|
|
|
|
CGameWorld m_PredictedWorld;
|
|
|
|
CGameWorld m_PrevPredictedWorld;
|
|
|
|
|
2022-06-11 19:38:18 +00:00
|
|
|
std::vector<SSwitchers> &Switchers() { return m_GameWorld.m_Core.m_vSwitchers; }
|
|
|
|
std::vector<SSwitchers> &PredSwitchers() { return m_PredictedWorld.m_Core.m_vSwitchers; }
|
2022-02-13 19:57:27 +00:00
|
|
|
|
2022-05-17 20:13:44 +00:00
|
|
|
void DummyResetInput() override;
|
|
|
|
void Echo(const char *pString) override;
|
2019-07-16 20:06:57 +00:00
|
|
|
bool IsOtherTeam(int ClientID);
|
2021-11-08 22:51:09 +00:00
|
|
|
int SwitchStateTeam();
|
2021-10-14 20:59:39 +00:00
|
|
|
bool IsLocalCharSuper();
|
2022-05-17 20:13:44 +00:00
|
|
|
bool CanDisplayWarning() override;
|
|
|
|
bool IsDisplayingWarning() override;
|
2022-06-22 21:46:25 +00:00
|
|
|
CNetObjHandler *GetNetObjHandler() override;
|
2019-06-05 17:17:55 +00:00
|
|
|
|
2020-09-26 07:37:35 +00:00
|
|
|
void LoadGameSkin(const char *pPath, bool AsDir = false);
|
|
|
|
void LoadEmoticonsSkin(const char *pPath, bool AsDir = false);
|
|
|
|
void LoadParticlesSkin(const char *pPath, bool AsDir = false);
|
2022-03-15 15:52:41 +00:00
|
|
|
void LoadHudSkin(const char *pPath, bool AsDir = false);
|
2022-06-14 17:28:51 +00:00
|
|
|
void LoadExtrasSkin(const char *pPath, bool AsDir = false);
|
2020-09-26 07:37:35 +00:00
|
|
|
|
2020-10-09 07:07:05 +00:00
|
|
|
void RefindSkins();
|
|
|
|
|
|
|
|
struct SClientGameSkin
|
|
|
|
{
|
|
|
|
// health armor hud
|
|
|
|
IGraphics::CTextureHandle m_SpriteHealthFull;
|
|
|
|
IGraphics::CTextureHandle m_SpriteHealthEmpty;
|
|
|
|
IGraphics::CTextureHandle m_SpriteArmorFull;
|
|
|
|
IGraphics::CTextureHandle m_SpriteArmorEmpty;
|
|
|
|
|
|
|
|
// cursors
|
|
|
|
IGraphics::CTextureHandle m_SpriteWeaponHammerCursor;
|
|
|
|
IGraphics::CTextureHandle m_SpriteWeaponGunCursor;
|
|
|
|
IGraphics::CTextureHandle m_SpriteWeaponShotgunCursor;
|
|
|
|
IGraphics::CTextureHandle m_SpriteWeaponGrenadeCursor;
|
|
|
|
IGraphics::CTextureHandle m_SpriteWeaponNinjaCursor;
|
|
|
|
IGraphics::CTextureHandle m_SpriteWeaponLaserCursor;
|
|
|
|
|
2022-06-25 08:39:39 +00:00
|
|
|
IGraphics::CTextureHandle m_aSpriteWeaponCursors[6];
|
2020-10-09 07:07:05 +00:00
|
|
|
|
|
|
|
// weapons and hook
|
|
|
|
IGraphics::CTextureHandle m_SpriteHookChain;
|
|
|
|
IGraphics::CTextureHandle m_SpriteHookHead;
|
|
|
|
IGraphics::CTextureHandle m_SpriteWeaponHammer;
|
|
|
|
IGraphics::CTextureHandle m_SpriteWeaponGun;
|
|
|
|
IGraphics::CTextureHandle m_SpriteWeaponShotgun;
|
|
|
|
IGraphics::CTextureHandle m_SpriteWeaponGrenade;
|
|
|
|
IGraphics::CTextureHandle m_SpriteWeaponNinja;
|
|
|
|
IGraphics::CTextureHandle m_SpriteWeaponLaser;
|
|
|
|
|
2022-06-25 08:39:39 +00:00
|
|
|
IGraphics::CTextureHandle m_aSpriteWeapons[6];
|
2020-10-09 07:07:05 +00:00
|
|
|
|
|
|
|
// particles
|
2022-06-25 08:39:39 +00:00
|
|
|
IGraphics::CTextureHandle m_aSpriteParticles[9];
|
2020-10-09 07:07:05 +00:00
|
|
|
|
|
|
|
// stars
|
2022-06-25 08:39:39 +00:00
|
|
|
IGraphics::CTextureHandle m_aSpriteStars[3];
|
2020-10-09 07:07:05 +00:00
|
|
|
|
|
|
|
// projectiles
|
|
|
|
IGraphics::CTextureHandle m_SpriteWeaponGunProjectile;
|
|
|
|
IGraphics::CTextureHandle m_SpriteWeaponShotgunProjectile;
|
|
|
|
IGraphics::CTextureHandle m_SpriteWeaponGrenadeProjectile;
|
|
|
|
IGraphics::CTextureHandle m_SpriteWeaponHammerProjectile;
|
|
|
|
IGraphics::CTextureHandle m_SpriteWeaponNinjaProjectile;
|
|
|
|
IGraphics::CTextureHandle m_SpriteWeaponLaserProjectile;
|
|
|
|
|
2022-06-25 08:39:39 +00:00
|
|
|
IGraphics::CTextureHandle m_aSpriteWeaponProjectiles[6];
|
2020-10-09 07:07:05 +00:00
|
|
|
|
|
|
|
// muzzles
|
|
|
|
IGraphics::CTextureHandle m_SpriteWeaponGunMuzzles[3];
|
|
|
|
IGraphics::CTextureHandle m_SpriteWeaponShotgunMuzzles[3];
|
|
|
|
IGraphics::CTextureHandle m_SpriteWeaponNinjaMuzzles[3];
|
|
|
|
|
|
|
|
IGraphics::CTextureHandle m_SpriteWeaponsMuzzles[6][3];
|
|
|
|
|
|
|
|
// pickups
|
|
|
|
IGraphics::CTextureHandle m_SpritePickupHealth;
|
|
|
|
IGraphics::CTextureHandle m_SpritePickupArmor;
|
2022-02-17 23:51:02 +00:00
|
|
|
IGraphics::CTextureHandle m_SpritePickupArmorShotgun;
|
|
|
|
IGraphics::CTextureHandle m_SpritePickupArmorGrenade;
|
|
|
|
IGraphics::CTextureHandle m_SpritePickupArmorNinja;
|
2022-05-16 13:31:46 +00:00
|
|
|
IGraphics::CTextureHandle m_SpritePickupArmorLaser;
|
2020-10-09 07:07:05 +00:00
|
|
|
IGraphics::CTextureHandle m_SpritePickupGrenade;
|
|
|
|
IGraphics::CTextureHandle m_SpritePickupShotgun;
|
|
|
|
IGraphics::CTextureHandle m_SpritePickupLaser;
|
|
|
|
IGraphics::CTextureHandle m_SpritePickupNinja;
|
|
|
|
IGraphics::CTextureHandle m_SpritePickupGun;
|
|
|
|
IGraphics::CTextureHandle m_SpritePickupHammer;
|
|
|
|
|
2022-06-25 08:39:39 +00:00
|
|
|
IGraphics::CTextureHandle m_aSpritePickupWeapons[6];
|
|
|
|
IGraphics::CTextureHandle m_aSpritePickupWeaponArmor[4];
|
2020-10-09 07:07:05 +00:00
|
|
|
|
|
|
|
// flags
|
|
|
|
IGraphics::CTextureHandle m_SpriteFlagBlue;
|
|
|
|
IGraphics::CTextureHandle m_SpriteFlagRed;
|
|
|
|
|
|
|
|
// ninja bar (0.7)
|
|
|
|
IGraphics::CTextureHandle m_SpriteNinjaBarFullLeft;
|
|
|
|
IGraphics::CTextureHandle m_SpriteNinjaBarFull;
|
|
|
|
IGraphics::CTextureHandle m_SpriteNinjaBarEmpty;
|
|
|
|
IGraphics::CTextureHandle m_SpriteNinjaBarEmptyRight;
|
|
|
|
|
|
|
|
bool IsSixup()
|
|
|
|
{
|
2012-08-12 12:02:50 +00:00
|
|
|
return m_SpriteNinjaBarFullLeft.IsValid();
|
2020-10-09 07:07:05 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
SClientGameSkin m_GameSkin;
|
|
|
|
bool m_GameSkinLoaded;
|
|
|
|
|
|
|
|
struct SClientParticlesSkin
|
|
|
|
{
|
|
|
|
IGraphics::CTextureHandle m_SpriteParticleSlice;
|
|
|
|
IGraphics::CTextureHandle m_SpriteParticleBall;
|
2022-06-25 08:39:39 +00:00
|
|
|
IGraphics::CTextureHandle m_aSpriteParticleSplat[3];
|
2020-10-09 07:07:05 +00:00
|
|
|
IGraphics::CTextureHandle m_SpriteParticleSmoke;
|
|
|
|
IGraphics::CTextureHandle m_SpriteParticleShell;
|
|
|
|
IGraphics::CTextureHandle m_SpriteParticleExpl;
|
|
|
|
IGraphics::CTextureHandle m_SpriteParticleAirJump;
|
|
|
|
IGraphics::CTextureHandle m_SpriteParticleHit;
|
2022-06-25 08:39:39 +00:00
|
|
|
IGraphics::CTextureHandle m_aSpriteParticles[10];
|
2020-10-09 07:07:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
SClientParticlesSkin m_ParticlesSkin;
|
|
|
|
bool m_ParticlesSkinLoaded;
|
|
|
|
|
|
|
|
struct SClientEmoticonsSkin
|
|
|
|
{
|
2022-06-25 08:39:39 +00:00
|
|
|
IGraphics::CTextureHandle m_aSpriteEmoticons[16];
|
2020-10-09 07:07:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
SClientEmoticonsSkin m_EmoticonsSkin;
|
|
|
|
bool m_EmoticonsSkinLoaded;
|
|
|
|
|
2022-03-15 15:52:41 +00:00
|
|
|
struct SClientHudSkin
|
|
|
|
{
|
|
|
|
IGraphics::CTextureHandle m_SpriteHudAirjump;
|
|
|
|
IGraphics::CTextureHandle m_SpriteHudAirjumpEmpty;
|
|
|
|
IGraphics::CTextureHandle m_SpriteHudSolo;
|
|
|
|
IGraphics::CTextureHandle m_SpriteHudNoCollision;
|
|
|
|
IGraphics::CTextureHandle m_SpriteHudEndlessJump;
|
|
|
|
IGraphics::CTextureHandle m_SpriteHudEndlessHook;
|
|
|
|
IGraphics::CTextureHandle m_SpriteHudJetpack;
|
|
|
|
IGraphics::CTextureHandle m_SpriteHudFreezeBarFullLeft;
|
|
|
|
IGraphics::CTextureHandle m_SpriteHudFreezeBarFull;
|
|
|
|
IGraphics::CTextureHandle m_SpriteHudFreezeBarEmpty;
|
|
|
|
IGraphics::CTextureHandle m_SpriteHudFreezeBarEmptyRight;
|
2022-03-29 21:24:39 +00:00
|
|
|
IGraphics::CTextureHandle m_SpriteHudNinjaBarFullLeft;
|
|
|
|
IGraphics::CTextureHandle m_SpriteHudNinjaBarFull;
|
|
|
|
IGraphics::CTextureHandle m_SpriteHudNinjaBarEmpty;
|
|
|
|
IGraphics::CTextureHandle m_SpriteHudNinjaBarEmptyRight;
|
2022-03-15 15:52:41 +00:00
|
|
|
IGraphics::CTextureHandle m_SpriteHudNoHookHit;
|
|
|
|
IGraphics::CTextureHandle m_SpriteHudNoHammerHit;
|
|
|
|
IGraphics::CTextureHandle m_SpriteHudNoShotgunHit;
|
|
|
|
IGraphics::CTextureHandle m_SpriteHudNoGrenadeHit;
|
|
|
|
IGraphics::CTextureHandle m_SpriteHudNoLaserHit;
|
2022-06-25 14:05:38 +00:00
|
|
|
IGraphics::CTextureHandle m_SpriteHudNoGunHit;
|
2022-03-25 09:09:13 +00:00
|
|
|
IGraphics::CTextureHandle m_SpriteHudDeepFrozen;
|
|
|
|
IGraphics::CTextureHandle m_SpriteHudLiveFrozen;
|
2022-03-15 15:52:41 +00:00
|
|
|
IGraphics::CTextureHandle m_SpriteHudTeleportGrenade;
|
|
|
|
IGraphics::CTextureHandle m_SpriteHudTeleportGun;
|
|
|
|
IGraphics::CTextureHandle m_SpriteHudTeleportLaser;
|
2022-03-31 16:05:16 +00:00
|
|
|
IGraphics::CTextureHandle m_SpriteHudPracticeMode;
|
2022-03-15 15:52:41 +00:00
|
|
|
IGraphics::CTextureHandle m_SpriteHudDummyHammer;
|
|
|
|
IGraphics::CTextureHandle m_SpriteHudDummyCopy;
|
|
|
|
};
|
|
|
|
|
|
|
|
SClientHudSkin m_HudSkin;
|
|
|
|
bool m_HudSkinLoaded;
|
|
|
|
|
2022-06-14 17:28:51 +00:00
|
|
|
struct SClientExtrasSkin
|
|
|
|
{
|
|
|
|
IGraphics::CTextureHandle m_SpriteParticleSnowflake;
|
2022-06-25 08:39:39 +00:00
|
|
|
IGraphics::CTextureHandle m_aSpriteParticles[1];
|
2022-06-14 17:28:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
SClientExtrasSkin m_ExtrasSkin;
|
|
|
|
bool m_ExtrasSkinLoaded;
|
|
|
|
|
2022-06-11 19:38:18 +00:00
|
|
|
const std::vector<CSnapEntities> &SnapEntities() { return m_vSnapEntities; }
|
2021-10-21 01:18:54 +00:00
|
|
|
|
2019-04-13 22:54:29 +00:00
|
|
|
private:
|
2022-06-11 19:38:18 +00:00
|
|
|
std::vector<CSnapEntities> m_vSnapEntities;
|
2021-10-21 01:18:54 +00:00
|
|
|
void SnapCollectEntities();
|
|
|
|
|
2020-10-18 14:51:26 +00:00
|
|
|
bool m_DDRaceMsgSent[NUM_DUMMIES];
|
|
|
|
int m_ShowOthers[NUM_DUMMIES];
|
2019-04-13 22:54:29 +00:00
|
|
|
|
2019-04-11 22:46:54 +00:00
|
|
|
void UpdatePrediction();
|
|
|
|
void UpdateRenderedCharacters();
|
|
|
|
void DetectStrongHook();
|
|
|
|
vec2 GetSmoothPos(int ClientID);
|
|
|
|
|
2020-04-18 20:16:25 +00:00
|
|
|
int m_PredictedDummyID;
|
|
|
|
int m_IsDummySwapping;
|
2019-04-11 22:46:54 +00:00
|
|
|
CCharOrder m_CharOrder;
|
2021-11-08 22:51:09 +00:00
|
|
|
int m_SwitchStateTeam[NUM_DUMMIES];
|
2019-09-08 22:53:07 +00:00
|
|
|
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
NUM_TUNEZONES = 256
|
|
|
|
};
|
|
|
|
void LoadMapSettings();
|
|
|
|
CTuningParams m_aTuningList[NUM_TUNEZONES];
|
2019-09-17 15:04:56 +00:00
|
|
|
CTuningParams *TuningList() { return m_aTuningList; }
|
2021-01-21 16:07:07 +00:00
|
|
|
|
|
|
|
float m_LastZoom;
|
|
|
|
float m_LastScreenAspect;
|
|
|
|
float m_LastDummyConnected;
|
2010-05-29 07:25:38 +00:00
|
|
|
};
|
|
|
|
|
2019-04-25 16:49:27 +00:00
|
|
|
ColorRGBA CalculateNameColor(ColorHSLA TextColorHSL);
|
2011-01-04 10:58:25 +00:00
|
|
|
|
2010-05-29 07:25:38 +00:00
|
|
|
#endif
|