MCPcopy Create free account
hub / github.com/ddnet/ddnet / UpdateTeeRenderInfo

Method UpdateTeeRenderInfo

src/game/client/components/ghost.cpp:371–386  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

369}
370
371void CGhost::UpdateTeeRenderInfo(CGhostItem &Ghost)
372{
373 CSkinDescriptor SkinDescriptor;
374 SkinDescriptor.m_Flags = CSkinDescriptor::FLAG_SIX;
375 IntsToStr(Ghost.m_Skin.m_aSkin, std::size(Ghost.m_Skin.m_aSkin), SkinDescriptor.m_aSkinName, std::size(SkinDescriptor.m_aSkinName));
376 if(!CSkin::IsValidName(SkinDescriptor.m_aSkinName))
377 {
378 str_copy(SkinDescriptor.m_aSkinName, "default");
379 }
380
381 CTeeRenderInfo TeeRenderInfo;
382 TeeRenderInfo.ApplyColors(Ghost.m_Skin.m_UseCustomColor, Ghost.m_Skin.m_ColorBody, Ghost.m_Skin.m_ColorFeet);
383 TeeRenderInfo.m_Size = 64.0f;
384
385 Ghost.m_pManagedTeeRenderInfo = GameClient()->CreateManagedTeeRenderInfo(TeeRenderInfo, SkinDescriptor);
386}
387
388void CGhost::StartRecord(int Tick)
389{

Callers

nothing calls this directly

Calls 4

IntsToStrFunction · 0.85
ApplyColorsMethod · 0.80
str_copyFunction · 0.50

Tested by

no test coverage detected