diff --git a/source/common b/source/common index 12785328cefb95553e293d215b37a4cb89cee666..e3014e94d2fe3e5211344f785df552ad38a62b89 160000 --- a/source/common +++ b/source/common @@ -1 +1 @@ -Subproject commit 12785328cefb95553e293d215b37a4cb89cee666 +Subproject commit e3014e94d2fe3e5211344f785df552ad38a62b89 diff --git a/source/game/EntityManager.cpp b/source/game/EntityManager.cpp index 4145cc34e7d75510999554979944c1a1d0864747..92107cac1841c1a07654d8eeee5697d6f28a80cc 100644 --- a/source/game/EntityManager.cpp +++ b/source/game/EntityManager.cpp @@ -417,10 +417,14 @@ bool CEntityManager::exportList(const char * file) proptable_t * pTbl; int ic = 0; - FILE *fp = fopen(file, "w"); - if(fp) + if(m_isOldImported) { - fclose(fp); + FILE *fp = fopen(file, "w"); + if(fp) + { + fclose(fp); + } + m_isOldImported = false; } // conf->set("meta", "count", "0"); @@ -491,7 +495,7 @@ bool CEntityManager::import(const char * file, bool shouldSendProgress) int ic = conf->getSectionCount(); tmpList.reserve(ic); - + m_isOldImported = conf->getKeyCount("meta") != 0; { XGUID guid; diff --git a/source/game/EntityManager.h b/source/game/EntityManager.h index 5cbd65f3a45fe43bed7cd6fe86838e45e17b77ae..a411a015b157d6ac1be1b093b48c19cd9cc4f9e9 100644 --- a/source/game/EntityManager.h +++ b/source/game/EntityManager.h @@ -188,6 +188,8 @@ private: void registerWaitForGUID(const XGUID &guid, CEntityPointer *pPtr); void unregisterWaitForGUID(const XGUID &guid, CEntityPointer *pPtr); void notifyWaitForGUID(const XGUID &guid, CBaseEntity *pEnt); + + bool m_isOldImported = false; }; #endif