| 1071 | } |
| 1072 | |
| 1073 | void NPCHazard::ReconChuck() |
| 1074 | { |
| 1075 | HAZBall* ball = &this->custdata.ball; |
| 1076 | |
| 1077 | xVec3 dir_norm = this->custdata.collide.dir_normal; |
| 1078 | xVec3 vel_flight = this->custdata.tartar.vel; |
| 1079 | |
| 1080 | Reconfigure(NPC_HAZ_CHUCKBLAST); |
| 1081 | |
| 1082 | if (xVec3Length2(&dir_norm) > 0.0f) |
| 1083 | { |
| 1084 | xVec3Copy((xVec3*)&this->mdl_hazard->Mat->up, &dir_norm); |
| 1085 | NPCC_MakePerp((xVec3*)&this->mdl_hazard->Mat->at, &dir_norm); |
| 1086 | xVec3Cross((xVec3*)&this->mdl_hazard->Mat->right, (xVec3*)&this->mdl_hazard->Mat->up, |
| 1087 | (xVec3*)&this->mdl_hazard->Mat->at); |
| 1088 | |
| 1089 | xMat3x3 mat; |
| 1090 | xMat3x3Rot(&mat, &dir_norm, 2 * PI * xurand()); |
| 1091 | xMat3x3Mul(xModelGetFrame(this->mdl_hazard), xModelGetFrame(this->mdl_hazard), &mat); |
| 1092 | |
| 1093 | F32 dot = xVec3Dot(&dir_norm, &g_Y3); |
| 1094 | |
| 1095 | if (FABS(dot) < 0.86f) |
| 1096 | { |
| 1097 | ball->rad_max *= 0.5f; |
| 1098 | ball->rad_min *= 0.5f; |
| 1099 | ball->rad_cur *= 0.5f; |
| 1100 | } |
| 1101 | } |
| 1102 | |
| 1103 | Start(NULL, -1.0f); |
| 1104 | |
| 1105 | if (this->flg_hazard & 0x8 && HAZ_AvailablePool() > 5) |
| 1106 | { |
| 1107 | for (S32 i = 0; i < 7; i++) |
| 1108 | { |
| 1109 | if (KickBlooshBlob(&vel_flight)) |
| 1110 | { |
| 1111 | this->flg_hazard |= 0x40; |
| 1112 | } |
| 1113 | } |
| 1114 | } |
| 1115 | } |
| 1116 | |
| 1117 | void NPCHazard::Upd_ChuckBlast(F32 dt) |
| 1118 | { |
nothing calls this directly
no test coverage detected