summaryrefslogtreecommitdiffstats
path: root/src/control/PathFind.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2019-10-11 00:51:25 +0200
committerGitHub <noreply@github.com>2019-10-11 00:51:25 +0200
commit0408b30a9ffba583f0437c294a98a2cecef74e1d (patch)
tree5fc346badb4cac417ea73b457831c3de89bc450f /src/control/PathFind.cpp
parentSingle-wagon train fix (diff)
parentFix CCarGenerator Load/Save (diff)
downloadre3-0408b30a9ffba583f0437c294a98a2cecef74e1d.tar
re3-0408b30a9ffba583f0437c294a98a2cecef74e1d.tar.gz
re3-0408b30a9ffba583f0437c294a98a2cecef74e1d.tar.bz2
re3-0408b30a9ffba583f0437c294a98a2cecef74e1d.tar.lz
re3-0408b30a9ffba583f0437c294a98a2cecef74e1d.tar.xz
re3-0408b30a9ffba583f0437c294a98a2cecef74e1d.tar.zst
re3-0408b30a9ffba583f0437c294a98a2cecef74e1d.zip
Diffstat (limited to 'src/control/PathFind.cpp')
-rw-r--r--src/control/PathFind.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/control/PathFind.cpp b/src/control/PathFind.cpp
index e9b33395..e9276dde 100644
--- a/src/control/PathFind.cpp
+++ b/src/control/PathFind.cpp
@@ -1409,40 +1409,40 @@ CPathFind::TestCoorsCloseness(CVector target, uint8 type, CVector start)
}
void
-CPathFind::Save(uint8 *buffer, uint32 *length)
+CPathFind::Save(uint8 *buf, uint32 *size)
{
int i;
int n = m_numPathNodes/8 + 1;
- *length = 2*n;
+ *size = 2*n;
for(i = 0; i < m_numPathNodes; i++)
if(m_pathNodes[i].bDisabled)
- buffer[i/8] |= 1 << i%8;
+ buf[i/8] |= 1 << i%8;
else
- buffer[i/8] &= ~(1 << i%8);
+ buf[i/8] &= ~(1 << i%8);
for(i = 0; i < m_numPathNodes; i++)
if(m_pathNodes[i].bBetweenLevels)
- buffer[i/8 + n] |= 1 << i%8;
+ buf[i/8 + n] |= 1 << i%8;
else
- buffer[i/8 + n] &= ~(1 << i%8);
+ buf[i/8 + n] &= ~(1 << i%8);
}
void
-CPathFind::Load(uint8 *buffer, uint32 length)
+CPathFind::Load(uint8 *buf, uint32 size)
{
int i;
int n = m_numPathNodes/8 + 1;
for(i = 0; i < m_numPathNodes; i++)
- if(buffer[i/8] & (1 << i%8))
+ if(buf[i/8] & (1 << i%8))
m_pathNodes[i].bDisabled = true;
else
m_pathNodes[i].bDisabled = false;
for(i = 0; i < m_numPathNodes; i++)
- if(buffer[i/8 + n] & (1 << i%8))
+ if(buf[i/8 + n] & (1 << i%8))
m_pathNodes[i].bBetweenLevels = true;
else
m_pathNodes[i].bBetweenLevels = false;