mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 14:38:18 +00:00
fixed saving skin with a name that already exists. Closes #1330
This commit is contained in:
parent
939be9c949
commit
d0a028ae7e
|
@ -284,7 +284,11 @@ void CSkins::AddSkin(const char *pSkinName)
|
|||
Skin.m_aUseCustomColors[PartIndex] = *ms_apUCCVariables[PartIndex];
|
||||
Skin.m_aPartColors[PartIndex] = *ms_apColorVariables[PartIndex];
|
||||
}
|
||||
m_aSkins.add(Skin);
|
||||
int SkinIndex = Find(pSkinName, false);
|
||||
if(SkinIndex != -1)
|
||||
m_aSkins[SkinIndex] = Skin;
|
||||
else
|
||||
m_aSkins.add(Skin);
|
||||
}
|
||||
|
||||
void CSkins::RemoveSkin(const CSkin *pSkin)
|
||||
|
|
Loading…
Reference in a new issue