Skip to content

Commit

Permalink
Merge branch 'test-merge'
Browse files Browse the repository at this point in the history
  • Loading branch information
sjrc6 committed Jun 13, 2022
2 parents 547c37d + 002c85b commit 9e7378b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/game/client/gameclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@
#include "components/menus.h"
#include "components/motd.h"
#include "components/nameplates.h"
#include "components/outlines.h"
#include "components/particles.h"
#include "components/player_indicator.h"
#include "components/outlines.h"
#include "components/players.h"
#include "components/race_demo.h"
#include "components/scoreboard.h"
Expand Down Expand Up @@ -225,7 +225,7 @@ void CGameClient::OnInit()

// propagate pointers
m_UI.Init(Input(), Graphics(), TextRender());
m_RenderTools.Init(Graphics(), TextRender());
m_RenderTools.Init(Graphics(), TextRender(), this);

int64_t Start = time_get();

Expand Down
11 changes: 6 additions & 5 deletions src/game/client/render.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,20 @@
#include "animstate.h"
#include "render.h"
#include <engine/graphics.h>
#include <engine/map.h>
#include <engine/shared/config.h>
#include <game/client/components/skins.h>
#include <game/client/gameclient.h>
#include <game/generated/client_data.h>
#include <game/generated/client_data7.h>
#include <game/generated/protocol.h>
#include <game/client/gameclient.h>


#include <game/layers.h>
static float gs_SpriteWScale;
static float gs_SpriteHScale;

void CRenderTools::Init(IGraphics *pGraphics, ITextRender *pTextRender)
void CRenderTools::Init(IGraphics *pGraphics, ITextRender *pTextRender, CGameClient *pGameClient)
{
m_pGameClient = (CGameClient *)pGameClient;
m_pGraphics = pGraphics;
m_pTextRender = pTextRender;
m_TeeQuadContainerIndex = Graphics()->CreateQuadContainer(false);
Expand Down Expand Up @@ -729,7 +731,6 @@ void CRenderTools::RenderTee(CAnimState *pAnim, CTeeRenderInfo *pInfo, int Emote
if(g_Config.m_ClWhiteFeet && pInfo->m_CustomColoredSkin)
{
CTeeRenderInfo WhiteFeetInfo;

int Skin = GameClient()->m_Skins.Find("x_ninja");
if(Skin != -1)
{
Expand Down
2 changes: 1 addition & 1 deletion src/game/client/render.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class CRenderTools
class ITextRender *TextRender() const { return m_pTextRender; }
class CGameClient *GameClient() const { return m_pGameClient; }

void Init(class IGraphics *pGraphics, class ITextRender *pTextRender);
void Init(class IGraphics *pGraphics, class ITextRender *pTextRender, class CGameClient *pGameClient);

void SelectSprite(struct CDataSprite *pSprite, int Flags = 0, int sx = 0, int sy = 0);
void SelectSprite(int Id, int Flags = 0, int sx = 0, int sy = 0);
Expand Down
3 changes: 2 additions & 1 deletion src/game/editor/editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6344,7 +6344,8 @@ void CEditor::Init()
m_pStorage = Kernel()->RequestInterface<IStorage>();
m_pSound = Kernel()->RequestInterface<ISound>();
m_UI.Init(m_pInput, m_pGraphics, m_pTextRender);
m_RenderTools.Init(m_pGraphics, m_pTextRender);
CGameClient *pGameClient = (CGameClient *)Kernel()->RequestInterface<IGameClient>();
m_RenderTools.Init(m_pGraphics, m_pTextRender, pGameClient);
m_Map.m_pEditor = this;

UIEx()->Init(UI(), Kernel(), RenderTools(), Input()->GetEventsRaw(), Input()->GetEventCountRaw());
Expand Down

0 comments on commit 9e7378b

Please sign in to comment.