| 212 | } |
| 213 | |
| 214 | S32 xGridRemove(xGridBound* bound) |
| 215 | { |
| 216 | if (bound->head) |
| 217 | { |
| 218 | if (gGridIterActive) |
| 219 | { |
| 220 | bound->deleted = 1; |
| 221 | return 0; |
| 222 | } |
| 223 | else |
| 224 | { |
| 225 | xGridBound* curr = bound->head[0]; |
| 226 | xGridBound** prev = bound->head; |
| 227 | while (curr && curr != bound) |
| 228 | { |
| 229 | prev = &curr->next; |
| 230 | curr = curr->next; |
| 231 | } |
| 232 | |
| 233 | *prev = curr->next; |
| 234 | curr->next = NULL; |
| 235 | curr->head = NULL; |
| 236 | curr->ingrid = 0; |
| 237 | curr->deleted = 0; |
| 238 | curr->gx = -1; |
| 239 | curr->gz = -1; |
| 240 | } |
| 241 | } |
| 242 | return 1; |
| 243 | } |
| 244 | |
| 245 | void xGridUpdate(xGrid* grid, xEnt* ent) |
| 246 | { |
no outgoing calls
no test coverage detected