| 175 | } |
| 176 | |
| 177 | void NetConnection::setGhostFrom(bool ghostFrom) |
| 178 | { |
| 179 | if(mGhostArray) |
| 180 | return; |
| 181 | |
| 182 | if(ghostFrom) |
| 183 | { |
| 184 | mGhostFreeIndex = mGhostZeroUpdateIndex = 0; |
| 185 | mGhostArray = new GhostInfo *[MaxGhostCount]; |
| 186 | mGhostRefs = new GhostInfo[MaxGhostCount]; |
| 187 | S32 i; |
| 188 | for(i = 0; i < MaxGhostCount; i++) |
| 189 | { |
| 190 | mGhostRefs[i].obj = NULL; |
| 191 | mGhostRefs[i].index = i; |
| 192 | mGhostRefs[i].updateMask = 0; |
| 193 | } |
| 194 | mGhostLookupTable = new GhostInfo *[GhostLookupTableSize]; |
| 195 | for(i = 0; i < GhostLookupTableSize; i++) |
| 196 | mGhostLookupTable[i] = 0; |
| 197 | } |
| 198 | } |
| 199 | |
| 200 | void NetConnection::ghostOnRemove() |
| 201 | { |