| 234 | } |
| 235 | |
| 236 | void xEntBoulder_Update(xEntBoulder* ent, xScene* sc, F32 dt) |
| 237 | { |
| 238 | // TODO: Improve variable names. |
| 239 | S32 i; |
| 240 | F32 dx__; |
| 241 | F32 dy__; |
| 242 | F32 dz__; |
| 243 | F32 f31; |
| 244 | F32 dVar16; |
| 245 | F32 dVar18; |
| 246 | F32 dVar20; |
| 247 | F32 uVar19; |
| 248 | xVec3 newRotVec; |
| 249 | xVec3 a; |
| 250 | xVec3 b; |
| 251 | xVec3 bubVelRnd; |
| 252 | xVec3 oldSphCen; |
| 253 | xVec3 velNorm; |
| 254 | xVec3 depen; |
| 255 | xVec3 tmp; |
| 256 | xVec3 depenNorm0; |
| 257 | xVec3 force; |
| 258 | xVec3 sphDist; |
| 259 | xVec3 depenNorm1; |
| 260 | xVec3 scaleVel; |
| 261 | xVec3 someVec; |
| 262 | S32 numDepens; |
| 263 | S32 iter_npc; |
| 264 | zNPCCommon* npc; |
| 265 | xMat3x3 rotM; |
| 266 | F32 vol; |
| 267 | xEntBoulder* boul; |
| 268 | |
| 269 | if ((ent->timeToLive > 0.0f) && (ent->timeToLive -= dt, ent->timeToLive <= 0.0f)) |
| 270 | { |
| 271 | zEntEvent(ent, eEventKill); |
| 272 | return; |
| 273 | } |
| 274 | else if ((ent == globals.player.bubblebowl) && |
| 275 | (dx__ = (globals.player.ent.bound.sph.center.x - ent->model->Mat->pos.x), |
| 276 | dy__ = (globals.player.ent.bound.sph.center.y - ent->model->Mat->pos.y), |
| 277 | dz__ = (globals.player.ent.bound.sph.center.z - ent->model->Mat->pos.z), |
| 278 | (dx__ * dx__) + (dy__ * dy__) + (dz__ * dz__) > 3600.0f)) |
| 279 | { |
| 280 | zEntEvent(ent, eEventKill); |
| 281 | return; |
| 282 | } |
| 283 | |
| 284 | if (ent->collis == NULL) |
| 285 | { |
| 286 | ent->collis = (xEntCollis*)&sBoulderCollis; |
| 287 | } |
| 288 | |
| 289 | ent->collis->chk = ent->collis_chk; |
| 290 | ent->collis->pen = ent->collis_pen; |
| 291 | ent->collis->post = NULL; |
| 292 | ent->collis->depenq = NULL; |
| 293 | xMat3x3RMulVec(&newRotVec, (xMat3x3*)ent->model->Mat, &ent->localCenter); |
nothing calls this directly
no test coverage detected