1#include "Game/MapObj/FirePressureBullet.hpp"
3FirePressureBullet::FirePressureBullet(
const char *pName) :
LiveActor(pName) {
7 mFirePressure =
nullptr;
14 initModelManagerWithAnm(
"FireBullet",
nullptr,
false);
15 MR::connectToSceneMapObj(
this);
21 MR::addHitSensorEnemyAttack(
this,
"body", 8, 100.0f, offs);
22 initBinder(100.0f, 0.0f, 0);
23 MR::onCalcGravity(
this);
24 initEffectKeeper(0,
nullptr,
false);
26 MR::initShadowVolumeSphere(
this, 75.0f);
27 initNerve(&NrvFirePressureBullet::FirePressureBulletNrvFly::sInstance);
31void FirePressureBullet::kill() {
32 MR::startSound(
this,
"SE_OJ_F_PRESSURE_FIRE_BURST", -1, -1);
38 MR::calcMtxFromGravityAndZAxis(&mtx,
this,
mGravity, _8C);
39 MR::setBaseTRMtx(
this, mtx);
42void FirePressureBullet::shotFireBullet(
LiveActor *pActor,
const TPos3f &rPos,
const f32 &a3,
bool a4,
bool a5) {
43 f32 v7 = rPos.mMtx[2][2];
44 f32 v9 = rPos.mMtx[1][2];
45 f32 v11 = rPos.mMtx[0][2];
46 mFirePressure = pActor;
52 f32 z = rPos.mMtx[2][3];
53 f32 y = rPos.mMtx[1][3];
54 f32 x = rPos.mMtx[0][3];
59 MR::validateHitSensors(
this);
60 MR::invalidateClipping(
this);
61 setNerve(&NrvFirePressureBullet::FirePressureBulletNrvFly::sInstance);
65void FirePressureBullet::exeFly() {
66 if (MR::isFirstStep(
this)) {
67 MR::startBck(
this,
"Shot",
nullptr);
68 MR::startBtk(
this,
"FireBullet");
71 if (MR::isBckOneTimeAndStopped(
this)) {
72 MR::startBck(
this,
"Move",
nullptr);
75 MR::startLevelSound(
this,
"SE_OJ_LV_F_PRESSURE_BULLET", -1, -1, -1);
77 if (_A0 && !(getNerveStep() % 5)) {
78 MR::turnDirectionToTargetDegree(
this, &_8C, *MR::getPlayerPos(), 3.0f);
85 else if (MR::isStep(
this, 300)) {
91 if (MR::isSensorEnemy(a2) || MR::isSensorMapObj(a2)) {
94 else if (!MR::isSensorPlayer(a2) && MR::sendMsgEnemyAttackFire(a2, a1)) {
99bool FirePressureBullet::isCrash()
const {
104 return MR::isBinded(
this);
107FirePressureBullet::~FirePressureBullet() {
111namespace NrvFirePressureBullet {
112 INIT_NERVE(FirePressureBulletNrvFly);
virtual void init(const JMapInfoIter &)
Intializes the NameObj and can set various settings and construct necessary classes.
virtual void calcAndSetBaseMtx()
Calculates and sets the base matrix of the actor.
The basis of a drawable actor that can contain states (see: Nerve)
TVec3f mRotation
3D vector of the actor's rotation.
TVec3f mPosition
3D vector of the actor's position.
TVec3f mVelocity
3D vector of the actor's velocity.
TVec3f mGravity
3D vector of the actor's gravity.