mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Merge #6094
6094: Check if ghost is really used bcs IntsToStr returns weird stuff for 0… r=def- a=Jupeyy … integers --- ignore whitespaces ## Checklist - [x] Tested the change ingame - [ ] Provided screenshots if it is a visual change - [ ] Tested in combination with possibly related configuration options - [ ] Written a unit test (especially base/) or added coverage to integration test - [ ] Considered possible null pointers and out of bounds array indexing - [ ] Changed no physics that affect existing maps - [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional) Co-authored-by: Jupeyy <jupjopjap@gmail.com>
This commit is contained in:
commit
2dcef1685b
|
@ -671,6 +671,8 @@ void CGhost::RefindSkin()
|
|||
{
|
||||
char aSkinName[64];
|
||||
for(auto &Ghost : m_aActiveGhosts)
|
||||
{
|
||||
if(!Ghost.Empty())
|
||||
{
|
||||
IntsToStr(&Ghost.m_Skin.m_Skin0, 6, aSkinName);
|
||||
if(aSkinName[0] != '\0')
|
||||
|
@ -683,6 +685,9 @@ void CGhost::RefindSkin()
|
|||
pRenderInfo->m_SkinMetrics = pSkin->m_Metrics;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!m_CurGhost.Empty())
|
||||
{
|
||||
IntsToStr(&m_CurGhost.m_Skin.m_Skin0, 6, aSkinName);
|
||||
if(aSkinName[0] != '\0')
|
||||
{
|
||||
|
@ -694,3 +699,4 @@ void CGhost::RefindSkin()
|
|||
pRenderInfo->m_SkinMetrics = pSkin->m_Metrics;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue