update stuff, remove stale data
| 254 | |
| 255 | // update stuff, remove stale data |
| 256 | void locvector::updatelocations() |
| 257 | { |
| 258 | // check if camera carrier changed |
| 259 | bool camchanged = false; |
| 260 | static physent *lastcamera = NULL; |
| 261 | if(lastcamera!=camera1) |
| 262 | { |
| 263 | if(lastcamera!=NULL) camchanged = true; |
| 264 | lastcamera = camera1; |
| 265 | } |
| 266 | |
| 267 | // update all locations |
| 268 | loopv(*this) |
| 269 | { |
| 270 | location *l = buf[i]; |
| 271 | if(!l) continue; |
| 272 | |
| 273 | l->update(); |
| 274 | if(l->stale) delete_(i--); |
| 275 | else if(camchanged) l->evaluateworldobjref(); // cam changed, evaluate world reference again |
| 276 | } |
| 277 | } |
| 278 | |
| 279 | // force pitch across all locations |
| 280 | void locvector::forcepitch(float pitch) |
no test coverage detected