| 93 | } |
| 94 | |
| 95 | void CGhost::CGhostPath::SetSize(int Items) |
| 96 | { |
| 97 | int Chunks = m_vpChunks.size(); |
| 98 | int NeededChunks = (Items + m_ChunkSize - 1) / m_ChunkSize; |
| 99 | |
| 100 | if(NeededChunks > Chunks) |
| 101 | { |
| 102 | m_vpChunks.resize(NeededChunks); |
| 103 | for(int i = Chunks; i < NeededChunks; i++) |
| 104 | m_vpChunks[i] = (CGhostCharacter *)calloc(m_ChunkSize, sizeof(CGhostCharacter)); |
| 105 | } |
| 106 | |
| 107 | m_NumItems = Items; |
| 108 | } |
| 109 | |
| 110 | void CGhost::CGhostPath::Add(const CGhostCharacter &Char) |
| 111 | { |