mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2025-01-28 22:48:02 +03:00
Closes #358
This commit is contained in:
parent
247e93b4ff
commit
5d2b1ac703
@ -84,7 +84,7 @@ void PlaceDirectory::Save(int fd)
|
|||||||
_write(fd, &count, sizeof(EntryType));
|
_write(fd, &count, sizeof(EntryType));
|
||||||
|
|
||||||
// store entries
|
// store entries
|
||||||
for (auto id : m_directory)
|
for (auto &id : m_directory)
|
||||||
{
|
{
|
||||||
auto placeName = TheBotPhrases->IDToName(id);
|
auto placeName = TheBotPhrases->IDToName(id);
|
||||||
|
|
||||||
@ -161,7 +161,7 @@ void CNavArea::Save(int fd, unsigned int version)
|
|||||||
size_t count = m_connect[d].size();
|
size_t count = m_connect[d].size();
|
||||||
_write(fd, &count, sizeof(size_t));
|
_write(fd, &count, sizeof(size_t));
|
||||||
|
|
||||||
for (auto connect : m_connect[d]) {
|
for (auto &connect : m_connect[d]) {
|
||||||
_write(fd, &connect.area->m_id, sizeof(unsigned int));
|
_write(fd, &connect.area->m_id, sizeof(unsigned int));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -236,7 +236,7 @@ void CNavArea::Save(int fd, unsigned int version)
|
|||||||
if (cv_bot_debug.value > 0.0f)
|
if (cv_bot_debug.value > 0.0f)
|
||||||
CONSOLE_ECHO(" m_spotEncounterList.size() = %d\n", count);
|
CONSOLE_ECHO(" m_spotEncounterList.size() = %d\n", count);
|
||||||
|
|
||||||
for (auto spote : m_spotEncounterList)
|
for (auto &spote : m_spotEncounterList)
|
||||||
{
|
{
|
||||||
if (spote.from.area)
|
if (spote.from.area)
|
||||||
_write(fd, &spote.from.area->m_id, sizeof(unsigned int));
|
_write(fd, &spote.from.area->m_id, sizeof(unsigned int));
|
||||||
@ -268,7 +268,7 @@ void CNavArea::Save(int fd, unsigned int version)
|
|||||||
_write(fd, &spotCount, sizeof(unsigned char));
|
_write(fd, &spotCount, sizeof(unsigned char));
|
||||||
|
|
||||||
saveCount = 0;
|
saveCount = 0;
|
||||||
for (auto order : spote.spotList)
|
for (auto &order : spote.spotList)
|
||||||
{
|
{
|
||||||
// order->spot may be NULL if we've loaded a nav mesh that has been edited but not re-analyzed
|
// order->spot may be NULL if we've loaded a nav mesh that has been edited but not re-analyzed
|
||||||
unsigned int id = (order.spot) ? order.spot->GetID() : 0;
|
unsigned int id = (order.spot) ? order.spot->GetID() : 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user