| 1420 | } |
| 1421 | |
| 1422 | F32 zNPCCommon::ThrottleApply(F32 dt, const xVec3* dir, S32 force3D) |
| 1423 | { |
| 1424 | xVec3 var_30; |
| 1425 | if (xVec3Length2(dir) < 0.00001f) |
| 1426 | { |
| 1427 | var_30 = *NPCC_faceDir(this) * this->spd_throttle; |
| 1428 | } |
| 1429 | else |
| 1430 | { |
| 1431 | var_30 = *dir * this->spd_throttle; |
| 1432 | } |
| 1433 | |
| 1434 | var_30 *= dt; |
| 1435 | |
| 1436 | if ((this->flg_move & 0x2) && !force3D) |
| 1437 | { |
| 1438 | this->frame->dpos.x = var_30.x; |
| 1439 | this->frame->dpos.z = var_30.z; |
| 1440 | } |
| 1441 | else |
| 1442 | { |
| 1443 | this->frame->dpos = var_30; |
| 1444 | } |
| 1445 | |
| 1446 | this->frame->mode |= 0x2; |
| 1447 | |
| 1448 | return this->spd_throttle; |
| 1449 | } |
| 1450 | |
| 1451 | F32 zNPCCommon::TurnToFace(F32 dt, const xVec3* dir_want, F32 useTurnRate) |
| 1452 | { |
no test coverage detected