diff options
Diffstat (limited to 'src/control/PathFind.cpp')
-rw-r--r-- | src/control/PathFind.cpp | 18 |
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; |