| 1319 | } |
| 1320 | |
| 1321 | static S32 getUpCB(xGoal* rawgoal, void*, en_trantype* trantype, F32 dt, void*) |
| 1322 | { |
| 1323 | zNPCGoalBossSandyRunToRope* runGoal = (zNPCGoalBossSandyRunToRope*)rawgoal; |
| 1324 | zNPCBSandy* sandy = (zNPCBSandy*)runGoal->psyche->clt_owner; |
| 1325 | S32 nextgoal = 0; |
| 1326 | xVec3 pcFuturePos; |
| 1327 | F32 futureDist; |
| 1328 | |
| 1329 | xVec3Sub(&pcFuturePos, (xVec3*)&globals.player.ent.model->Mat->pos, |
| 1330 | (xVec3*)&sandy->model->Mat->pos); |
| 1331 | |
| 1332 | pcFuturePos.y = 0.0f; |
| 1333 | futureDist = xVec3Length2(&pcFuturePos); |
| 1334 | |
| 1335 | if (sandy->AnimTimeRemain(NULL) < 1.7f * dt) |
| 1336 | { |
| 1337 | if ((sandy->round == 1 && !(sandy->hitPoints > 6)) || |
| 1338 | (sandy->round == 2 && !(sandy->hitPoints > 3)) || |
| 1339 | (sandy->round == 3 && !(sandy->hitPoints > 0)) || (globals.player.ControlOff)) |
| 1340 | { |
| 1341 | nextgoal = 'NGB1'; |
| 1342 | *trantype = GOAL_TRAN_SET; |
| 1343 | } |
| 1344 | else if (sandy->bossFlags & 0x2) |
| 1345 | { |
| 1346 | sandy->bossFlags &= ~0x2; |
| 1347 | nextgoal = 'NGB2'; |
| 1348 | *trantype = GOAL_TRAN_SET; |
| 1349 | } |
| 1350 | else if (futureDist < 12.0f) |
| 1351 | { |
| 1352 | nextgoal = 'NGB4'; |
| 1353 | *trantype = GOAL_TRAN_SET; |
| 1354 | } |
| 1355 | else |
| 1356 | { |
| 1357 | nextgoal = 'NGB3'; |
| 1358 | *trantype = GOAL_TRAN_SET; |
| 1359 | } |
| 1360 | } |
| 1361 | |
| 1362 | return nextgoal; |
| 1363 | } |
| 1364 | |
| 1365 | static S32 runToRopeCB(xGoal* rawgoal, void*, en_trantype* trantype, F32 dt, void*) |
| 1366 | { |
nothing calls this directly
no test coverage detected