Merge pull request #1323 from heinrich5991/pr_ddnet_fix_editor_dontembedvanilla

Duh. Fix editor embedding vanilla images and not others
This commit is contained in:
Dennis Felsing 2018-10-03 20:40:48 +02:00 committed by GitHub
commit 20b31723c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3363,7 +3363,7 @@ void CEditor::AddImage(const char *pFileName, int StorageType, void *pUser)
*pImg = ImgInfo;
pImg->m_TexID = pEditor->Graphics()->LoadTextureRaw(ImgInfo.m_Width, ImgInfo.m_Height, ImgInfo.m_Format, ImgInfo.m_pData, CImageInfo::FORMAT_AUTO, 0);
ImgInfo.m_pData = 0;
pImg->m_External = !IsVanillaImage(aBuf);
pImg->m_External = IsVanillaImage(aBuf);
str_copy(pImg->m_aName, aBuf, sizeof(pImg->m_aName));
pImg->m_AutoMapper.Load(pImg->m_aName);
pEditor->m_Map.m_lImages.add(pImg);