mirror of
https://github.com/MonsterDruide1/OdysseyDecomp.git
synced 2024-11-26 23:00:25 +00:00
Change parameter names of HitSensor
s to self
/other
(#196)
Some checks failed
Compile and verify functions / compile_verify (push) Has been cancelled
Copy headers to separate repo / copy_headers (push) Has been cancelled
lint / clang-format (push) Has been cancelled
lint / custom-lint (push) Has been cancelled
progress / publish_progress (push) Has been cancelled
testcompile / test_compile (push) Has been cancelled
Some checks failed
Compile and verify functions / compile_verify (push) Has been cancelled
Copy headers to separate repo / copy_headers (push) Has been cancelled
lint / clang-format (push) Has been cancelled
lint / custom-lint (push) Has been cancelled
progress / publish_progress (push) Has been cancelled
testcompile / test_compile (push) Has been cancelled
This commit is contained in:
parent
799f31bd28
commit
33372bd0ef
@ -60,9 +60,9 @@ StageSwitchKeeper* LiveActor::getStageSwitchKeeper() const {
|
|||||||
|
|
||||||
void LiveActor::init(const ActorInitInfo& info) {}
|
void LiveActor::init(const ActorInitInfo& info) {}
|
||||||
|
|
||||||
void LiveActor::attackSensor(HitSensor* target, HitSensor* source) {}
|
void LiveActor::attackSensor(HitSensor* self, HitSensor* other) {}
|
||||||
|
|
||||||
bool LiveActor::receiveMsg(const SensorMsg* message, HitSensor* source, HitSensor* target) {
|
bool LiveActor::receiveMsg(const SensorMsg* message, HitSensor* other, HitSensor* self) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,8 +68,8 @@ public:
|
|||||||
virtual void draw() const;
|
virtual void draw() const;
|
||||||
virtual void startClipped();
|
virtual void startClipped();
|
||||||
virtual void endClipped();
|
virtual void endClipped();
|
||||||
virtual void attackSensor(HitSensor* target, HitSensor* source);
|
virtual void attackSensor(HitSensor* self, HitSensor* other);
|
||||||
virtual bool receiveMsg(const SensorMsg* message, HitSensor* source, HitSensor* target);
|
virtual bool receiveMsg(const SensorMsg* message, HitSensor* other, HitSensor* self);
|
||||||
virtual bool receiveMsgScreenPoint(const SensorMsg* message, ScreenPointer* source,
|
virtual bool receiveMsgScreenPoint(const SensorMsg* message, ScreenPointer* source,
|
||||||
ScreenPointTarget* target);
|
ScreenPointTarget* target);
|
||||||
virtual const char* getName() const override;
|
virtual const char* getName() const override;
|
||||||
|
@ -151,8 +151,8 @@ void BreakMapPartsBase::startBreakByProgram() {
|
|||||||
setNerve(this, &NrvBreakMapPartsBase.Break);
|
setNerve(this, &NrvBreakMapPartsBase.Break);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BreakMapPartsBase::receiveMsg(const SensorMsg* message, HitSensor* source, HitSensor* target) {
|
bool BreakMapPartsBase::receiveMsg(const SensorMsg* message, HitSensor* other, HitSensor* self) {
|
||||||
if (isNerve(this, &NrvBreakMapPartsBase.Wait) && mJudgeFunction(message, source, target)) {
|
if (isNerve(this, &NrvBreakMapPartsBase.Wait) && mJudgeFunction(message, other, self)) {
|
||||||
startBreakByProgram();
|
startBreakByProgram();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
namespace al {
|
namespace al {
|
||||||
class MtxConnector;
|
class MtxConnector;
|
||||||
|
|
||||||
using JudgeFuncPtr = bool (*)(const SensorMsg* message, HitSensor* source, HitSensor* target);
|
using JudgeFuncPtr = bool (*)(const SensorMsg* message, HitSensor* other, HitSensor* self);
|
||||||
|
|
||||||
class BreakMapPartsBase : public LiveActor {
|
class BreakMapPartsBase : public LiveActor {
|
||||||
public:
|
public:
|
||||||
@ -19,7 +19,7 @@ public:
|
|||||||
void exeWait();
|
void exeWait();
|
||||||
void exeBreak();
|
void exeBreak();
|
||||||
void startBreakByProgram();
|
void startBreakByProgram();
|
||||||
bool receiveMsg(const SensorMsg* message, HitSensor* source, HitSensor* target) override;
|
bool receiveMsg(const SensorMsg* message, HitSensor* other, HitSensor* self) override;
|
||||||
virtual JudgeFuncPtr getJudgeFunction(const char* name) const;
|
virtual JudgeFuncPtr getJudgeFunction(const char* name) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -27,8 +27,8 @@ void ChildStep::init(const ActorInitInfo& info) {
|
|||||||
makeActorAlive();
|
makeActorAlive();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ChildStep::receiveMsg(const SensorMsg* message, HitSensor* source, HitSensor* target) {
|
bool ChildStep::receiveMsg(const SensorMsg* message, HitSensor* other, HitSensor* self) {
|
||||||
return mParent->receiveMsg(message, source, target);
|
return mParent->receiveMsg(message, other, self);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChildStep::exeWait() {
|
void ChildStep::exeWait() {
|
||||||
|
@ -8,7 +8,7 @@ public:
|
|||||||
ChildStep(const char* name, LiveActor* parent);
|
ChildStep(const char* name, LiveActor* parent);
|
||||||
|
|
||||||
void init(const ActorInitInfo& info) override;
|
void init(const ActorInitInfo& info) override;
|
||||||
bool receiveMsg(const SensorMsg* message, HitSensor* source, HitSensor* target) override;
|
bool receiveMsg(const SensorMsg* message, HitSensor* other, HitSensor* self) override;
|
||||||
void exeWait();
|
void exeWait();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -40,7 +40,7 @@ void FallMapParts::init(const ActorInitInfo& info) {
|
|||||||
trySyncStageSwitchAppear(this);
|
trySyncStageSwitchAppear(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FallMapParts::receiveMsg(const SensorMsg* message, HitSensor* source, HitSensor* target) {
|
bool FallMapParts::receiveMsg(const SensorMsg* message, HitSensor* other, HitSensor* self) {
|
||||||
if (isMsgFloorTouch(message) && isNerve(this, NrvFallMapParts.Wait.data())) {
|
if (isMsgFloorTouch(message) && isNerve(this, NrvFallMapParts.Wait.data())) {
|
||||||
startNerveAction(this, "FallSign");
|
startNerveAction(this, "FallSign");
|
||||||
invalidateClipping(this);
|
invalidateClipping(this);
|
||||||
|
@ -8,7 +8,7 @@ public:
|
|||||||
FallMapParts(const char* name);
|
FallMapParts(const char* name);
|
||||||
|
|
||||||
void init(const ActorInitInfo& info) override;
|
void init(const ActorInitInfo& info) override;
|
||||||
bool receiveMsg(const SensorMsg* message, HitSensor* source, HitSensor* target) override;
|
bool receiveMsg(const SensorMsg* message, HitSensor* other, HitSensor* self) override;
|
||||||
void appearAndSetStart();
|
void appearAndSetStart();
|
||||||
void exeAppear();
|
void exeAppear();
|
||||||
void exeWait();
|
void exeWait();
|
||||||
|
@ -40,7 +40,7 @@ void FixMapParts::calcAnim() {
|
|||||||
calcViewModel(this);
|
calcViewModel(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FixMapParts::receiveMsg(const SensorMsg* message, HitSensor* source, HitSensor* target) {
|
bool FixMapParts::receiveMsg(const SensorMsg* message, HitSensor* other, HitSensor* self) {
|
||||||
if (isMsgAskSafetyPoint(message))
|
if (isMsgAskSafetyPoint(message))
|
||||||
return !isValidSwitchAppear(this) && !isValidSwitchKill(this);
|
return !isValidSwitchAppear(this) && !isValidSwitchKill(this);
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ public:
|
|||||||
void appear() override;
|
void appear() override;
|
||||||
void movement() override;
|
void movement() override;
|
||||||
void calcAnim() override;
|
void calcAnim() override;
|
||||||
bool receiveMsg(const SensorMsg* message, HitSensor* source, HitSensor* target) override;
|
bool receiveMsg(const SensorMsg* message, HitSensor* other, HitSensor* self) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool mIsStatic = false;
|
bool mIsStatic = false;
|
||||||
|
@ -53,7 +53,7 @@ void FloaterMapParts::init(const ActorInitInfo& info) {
|
|||||||
trySyncStageSwitchAppear(this);
|
trySyncStageSwitchAppear(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FloaterMapParts::receiveMsg(const SensorMsg* message, HitSensor* source, HitSensor* target) {
|
bool FloaterMapParts::receiveMsg(const SensorMsg* message, HitSensor* other, HitSensor* self) {
|
||||||
if (isMsgFloorTouch(message)) {
|
if (isMsgFloorTouch(message)) {
|
||||||
mMoveType = FloaterMoveType::Sink;
|
mMoveType = FloaterMoveType::Sink;
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ public:
|
|||||||
FloaterMapParts(const char* name);
|
FloaterMapParts(const char* name);
|
||||||
|
|
||||||
void init(const ActorInitInfo& info) override;
|
void init(const ActorInitInfo& info) override;
|
||||||
bool receiveMsg(const SensorMsg* message, HitSensor* source, HitSensor* target) override;
|
bool receiveMsg(const SensorMsg* message, HitSensor* other, HitSensor* self) override;
|
||||||
void appearAndSetStart();
|
void appearAndSetStart();
|
||||||
void control() override;
|
void control() override;
|
||||||
void exeWait();
|
void exeWait();
|
||||||
|
@ -92,8 +92,7 @@ void RollingCubeMapParts::kill() {
|
|||||||
LiveActor::kill();
|
LiveActor::kill();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RollingCubeMapParts::receiveMsg(const SensorMsg* message, HitSensor* source,
|
bool RollingCubeMapParts::receiveMsg(const SensorMsg* message, HitSensor* other, HitSensor* self) {
|
||||||
HitSensor* target) {
|
|
||||||
if (isMsgPlayerFloorTouch(message) && isNerve(this, NrvRollingCubeMapParts.Wait.data())) {
|
if (isMsgPlayerFloorTouch(message) && isNerve(this, NrvRollingCubeMapParts.Wait.data())) {
|
||||||
startNerveAction(this, "Start");
|
startNerveAction(this, "Start");
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ public:
|
|||||||
|
|
||||||
void init(const ActorInitInfo& info) override;
|
void init(const ActorInitInfo& info) override;
|
||||||
void kill() override;
|
void kill() override;
|
||||||
bool receiveMsg(const SensorMsg* message, HitSensor* source, HitSensor* target) override;
|
bool receiveMsg(const SensorMsg* message, HitSensor* other, HitSensor* self) override;
|
||||||
void control() override;
|
void control() override;
|
||||||
void appearAndSetStart();
|
void appearAndSetStart();
|
||||||
void setNerveNextMovement(bool isNextFallKey);
|
void setNerveNextMovement(bool isNextFallKey);
|
||||||
|
@ -49,6 +49,6 @@ void ItemAmiiboKoopa::exeWait() {
|
|||||||
al::setTrans(this, rs::getPlayerPos(this));
|
al::setTrans(this, rs::getPlayerPos(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
void ItemAmiiboKoopa::attackSensor(al::HitSensor* target, al::HitSensor* source) {
|
void ItemAmiiboKoopa::attackSensor(al::HitSensor* self, al::HitSensor* other) {
|
||||||
rs::sendMsgItemAmiiboKoopa(source, target);
|
rs::sendMsgItemAmiiboKoopa(other, self);
|
||||||
}
|
}
|
||||||
|
@ -11,5 +11,5 @@ public:
|
|||||||
void exeExpand();
|
void exeExpand();
|
||||||
void exeWait();
|
void exeWait();
|
||||||
|
|
||||||
void attackSensor(al::HitSensor* target, al::HitSensor* source);
|
void attackSensor(al::HitSensor* self, al::HitSensor* other);
|
||||||
};
|
};
|
||||||
|
@ -33,12 +33,12 @@ void EnemyStateDamageCap::createEnemyCap(const al::ActorInitInfo& info, const ch
|
|||||||
mEnemyCap = rs::tryCreateEnemyCap(mActor, info, name);
|
mEnemyCap = rs::tryCreateEnemyCap(mActor, info, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool EnemyStateDamageCap::tryReceiveMsgCapBlow(const al::SensorMsg* msg, al::HitSensor* source,
|
bool EnemyStateDamageCap::tryReceiveMsgCapBlow(const al::SensorMsg* msg, al::HitSensor* other,
|
||||||
al::HitSensor* target) {
|
al::HitSensor* self) {
|
||||||
if (!isCapOn() || !rs::isMsgCapAttack(msg))
|
if (!isCapOn() || !rs::isMsgCapAttack(msg))
|
||||||
return false;
|
return false;
|
||||||
rs::requestHitReactionToAttacker(msg, target, source);
|
rs::requestHitReactionToAttacker(msg, self, other);
|
||||||
mEnemyCap->startBlowDown(source);
|
mEnemyCap->startBlowDown(other);
|
||||||
al::setNerve(this, &NrvEnemyStateDamageCap.Wait);
|
al::setNerve(this, &NrvEnemyStateDamageCap.Wait);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -39,12 +39,12 @@ EnemyStateHackStart::EnemyStateHackStart(al::LiveActor* rootActor,
|
|||||||
mPlayerHackStartShaderCtrl = new PlayerHackStartShaderCtrl(rootActor, shaderParam);
|
mPlayerHackStartShaderCtrl = new PlayerHackStartShaderCtrl(rootActor, shaderParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
IUsePlayerHack* EnemyStateHackStart::tryStart(const al::SensorMsg* sensor, al::HitSensor* source,
|
IUsePlayerHack* EnemyStateHackStart::tryStart(const al::SensorMsg* msg, al::HitSensor* other,
|
||||||
al::HitSensor* target) {
|
al::HitSensor* self) {
|
||||||
if (!rs::isMsgStartHack(sensor))
|
if (!rs::isMsgStartHack(msg))
|
||||||
return nullptr;
|
return nullptr;
|
||||||
al::setVelocityZero(mActor);
|
al::setVelocityZero(mActor);
|
||||||
mHackActor = rs::startHack(target, source, 0);
|
mHackActor = rs::startHack(self, other, 0);
|
||||||
rs::startHackStartDemo(mHackActor, mActor);
|
rs::startHackStartDemo(mHackActor, mActor);
|
||||||
al::setNerve(this, &DiveIn);
|
al::setNerve(this, &DiveIn);
|
||||||
return mHackActor;
|
return mHackActor;
|
||||||
|
@ -64,15 +64,15 @@ void AnagramAlphabetCharacter::init(const al::ActorInitInfo& info) {
|
|||||||
makeActorAlive();
|
makeActorAlive();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AnagramAlphabetCharacter::attackSensor(al::HitSensor* target, al::HitSensor* source) {
|
void AnagramAlphabetCharacter::attackSensor(al::HitSensor* self, al::HitSensor* other) {
|
||||||
if (mHackerParent)
|
if (mHackerParent)
|
||||||
return rs::sendMsgHackerNoReaction(mHackerParent, source, target);
|
return rs::sendMsgHackerNoReaction(mHackerParent, other, self);
|
||||||
if (!al::isSensorNpc(target))
|
if (!al::isSensorNpc(self))
|
||||||
return;
|
return;
|
||||||
if (al::isSensorPlayer(source) && al::isSensorName(source, "Pushed"))
|
if (al::isSensorPlayer(other) && al::isSensorName(other, "Pushed"))
|
||||||
al::sendMsgPush(source, target);
|
al::sendMsgPush(other, self);
|
||||||
else if (al::isSensorNpc(source))
|
else if (al::isSensorNpc(other))
|
||||||
al::sendMsgPush(source, target);
|
al::sendMsgPush(other, self);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AnagramAlphabetCharacter::isHack() {
|
bool AnagramAlphabetCharacter::isHack() {
|
||||||
@ -82,16 +82,16 @@ bool AnagramAlphabetCharacter::isHack() {
|
|||||||
al::isNerve(this, &NrvAnagramAlphabetCharacter.HackGoal);
|
al::isNerve(this, &NrvAnagramAlphabetCharacter.HackGoal);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AnagramAlphabetCharacter::receiveMsg(const al::SensorMsg* message, al::HitSensor* source,
|
bool AnagramAlphabetCharacter::receiveMsg(const al::SensorMsg* message, al::HitSensor* other,
|
||||||
al::HitSensor* target) {
|
al::HitSensor* self) {
|
||||||
if (rs::tryReceiveMsgInitCapTargetAndSetCapTargetInfo(message, mCapTargetInfo))
|
if (rs::tryReceiveMsgInitCapTargetAndSetCapTargetInfo(message, mCapTargetInfo))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (rs::isMsgPlayerDisregardHomingAttack(message) ||
|
if (rs::isMsgPlayerDisregardHomingAttack(message) ||
|
||||||
rs::isMsgPlayerDisregardTargetMarker(message))
|
rs::isMsgPlayerDisregardTargetMarker(message))
|
||||||
return al::isSensorName(target, "Body");
|
return al::isSensorName(self, "Body");
|
||||||
|
|
||||||
if (rs::isMsgTargetMarkerPosition(message) && al::isSensorName(target, "PossessedHitMark")) {
|
if (rs::isMsgTargetMarkerPosition(message) && al::isSensorName(self, "PossessedHitMark")) {
|
||||||
const sead::Vector3f& sensorPos = al::getSensorPos(this, "PossessedHitMark");
|
const sead::Vector3f& sensorPos = al::getSensorPos(this, "PossessedHitMark");
|
||||||
rs::setMsgTargetMarkerPosition(message, sead::Vector3f::ey * 60.0f + sensorPos);
|
rs::setMsgTargetMarkerPosition(message, sead::Vector3f::ey * 60.0f + sensorPos);
|
||||||
return true;
|
return true;
|
||||||
@ -124,7 +124,7 @@ bool AnagramAlphabetCharacter::receiveMsg(const al::SensorMsg* message, al::HitS
|
|||||||
if (rs::isMsgHackerDamageAndCancel(message)) {
|
if (rs::isMsgHackerDamageAndCancel(message)) {
|
||||||
if (isHack()) {
|
if (isHack()) {
|
||||||
sead::Vector3f dir;
|
sead::Vector3f dir;
|
||||||
al::calcDirBetweenSensorsH(&dir, source, target);
|
al::calcDirBetweenSensorsH(&dir, other, self);
|
||||||
endHackDir(dir);
|
endHackDir(dir);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -135,7 +135,7 @@ bool AnagramAlphabetCharacter::receiveMsg(const al::SensorMsg* message, al::HitS
|
|||||||
if (al::isNerve(this, &NrvAnagramAlphabetCharacter.WaitHack)) {
|
if (al::isNerve(this, &NrvAnagramAlphabetCharacter.WaitHack)) {
|
||||||
al::setNerve(this, &NrvAnagramAlphabetCharacter.WaitHackStart);
|
al::setNerve(this, &NrvAnagramAlphabetCharacter.WaitHackStart);
|
||||||
al::invalidateClipping(this);
|
al::invalidateClipping(this);
|
||||||
mHackerParent = rs::startHack(target, source, nullptr);
|
mHackerParent = rs::startHack(self, other, nullptr);
|
||||||
rs::startHackStartDemo(mHackerParent, this);
|
rs::startHackStartDemo(mHackerParent, this);
|
||||||
return true;
|
return true;
|
||||||
} else
|
} else
|
||||||
@ -146,7 +146,7 @@ bool AnagramAlphabetCharacter::receiveMsg(const al::SensorMsg* message, al::HitS
|
|||||||
if (al::isNerve(this, &NrvAnagramAlphabetCharacter.Complete))
|
if (al::isNerve(this, &NrvAnagramAlphabetCharacter.Complete))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (al::isSensorName(target, "PossessedHitMark")) {
|
if (al::isSensorName(self, "PossessedHitMark")) {
|
||||||
if (al::isNerve(this, &NrvAnagramAlphabetCharacter.Wait))
|
if (al::isNerve(this, &NrvAnagramAlphabetCharacter.Wait))
|
||||||
al::setNerve(this, &NrvAnagramAlphabetCharacter.WaitHack);
|
al::setNerve(this, &NrvAnagramAlphabetCharacter.WaitHack);
|
||||||
|
|
||||||
@ -162,7 +162,7 @@ bool AnagramAlphabetCharacter::receiveMsg(const al::SensorMsg* message, al::HitS
|
|||||||
if ((al::isNerve(this, &NrvAnagramAlphabetCharacter.HackWait) ||
|
if ((al::isNerve(this, &NrvAnagramAlphabetCharacter.HackWait) ||
|
||||||
al::isNerve(this, &NrvAnagramAlphabetCharacter.HackMove) ||
|
al::isNerve(this, &NrvAnagramAlphabetCharacter.HackMove) ||
|
||||||
al::isNerve(this, &NrvAnagramAlphabetCharacter.HackFall)) &&
|
al::isNerve(this, &NrvAnagramAlphabetCharacter.HackFall)) &&
|
||||||
al::tryReceiveMsgPushAndAddVelocityH(this, message, source, target, 10.0f)) {
|
al::tryReceiveMsgPushAndAddVelocityH(this, message, other, self, 10.0f)) {
|
||||||
if (al::isCollidedWall(this))
|
if (al::isCollidedWall(this))
|
||||||
al::limitVelocityDirSign(this, -al::getCollidedWallNormal(this), 0.0f);
|
al::limitVelocityDirSign(this, -al::getCollidedWallNormal(this), 0.0f);
|
||||||
|
|
||||||
|
@ -15,8 +15,8 @@ public:
|
|||||||
AnagramAlphabetCharacter(const char* name);
|
AnagramAlphabetCharacter(const char* name);
|
||||||
|
|
||||||
void init(const al::ActorInitInfo& info);
|
void init(const al::ActorInitInfo& info);
|
||||||
void attackSensor(al::HitSensor* source, al::HitSensor* target);
|
void attackSensor(al::HitSensor* self, al::HitSensor* other);
|
||||||
bool receiveMsg(const al::SensorMsg* message, al::HitSensor* target, al::HitSensor* source);
|
bool receiveMsg(const al::SensorMsg* message, al::HitSensor* other, al::HitSensor* self);
|
||||||
void setComplete();
|
void setComplete();
|
||||||
void killCapTarget();
|
void killCapTarget();
|
||||||
|
|
||||||
|
@ -53,8 +53,7 @@ void ChurchDoor::init(const al::ActorInitInfo& info) {
|
|||||||
makeActorAlive();
|
makeActorAlive();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ChurchDoor::receiveMsg(const al::SensorMsg* msg, al::HitSensor* source,
|
bool ChurchDoor::receiveMsg(const al::SensorMsg* msg, al::HitSensor* other, al::HitSensor* self) {
|
||||||
al::HitSensor* target) {
|
|
||||||
if (rs::isMsgPlayerDisregardTargetMarker(msg))
|
if (rs::isMsgPlayerDisregardTargetMarker(msg))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
@ -63,7 +62,7 @@ bool ChurchDoor::receiveMsg(const al::SensorMsg* msg, al::HitSensor* source,
|
|||||||
al::isLessEqualStep(this, 10))
|
al::isLessEqualStep(this, 10))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
rs::requestHitReactionToAttacker(msg, source, al::getSensorPos(source));
|
rs::requestHitReactionToAttacker(msg, other, al::getSensorPos(other));
|
||||||
|
|
||||||
if (al::isNerve(this, &CloseWait1)) {
|
if (al::isNerve(this, &CloseWait1)) {
|
||||||
al::startHitReaction(this, "ヒット1回目");
|
al::startHitReaction(this, "ヒット1回目");
|
||||||
|
@ -9,8 +9,7 @@ public:
|
|||||||
ChurchDoor(const char* name);
|
ChurchDoor(const char* name);
|
||||||
|
|
||||||
void init(const al::ActorInitInfo& info) override;
|
void init(const al::ActorInitInfo& info) override;
|
||||||
bool receiveMsg(const al::SensorMsg* msg, al::HitSensor* source,
|
bool receiveMsg(const al::SensorMsg* msg, al::HitSensor* other, al::HitSensor* self) override;
|
||||||
al::HitSensor* target) override;
|
|
||||||
|
|
||||||
bool isOpenWait() const;
|
bool isOpenWait() const;
|
||||||
bool isDemoEnterChurch() const;
|
bool isDemoEnterChurch() const;
|
||||||
|
@ -46,9 +46,9 @@ void CitySignal::calcAnim() {
|
|||||||
al::calcViewModel(this);
|
al::calcViewModel(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CitySignal::receiveMsg(const al::SensorMsg* message, al::HitSensor* source,
|
bool CitySignal::receiveMsg(const al::SensorMsg* message, al::HitSensor* other,
|
||||||
al::HitSensor* target) {
|
al::HitSensor* self) {
|
||||||
if (al::isMsgExplosion(message) && al::isSensorMapObj(target) &&
|
if (al::isMsgExplosion(message) && al::isSensorMapObj(self) &&
|
||||||
(al::isNerve(this, &NrvCitySignal.WaitRed) || al::isNerve(this, &NrvCitySignal.WaitBlue))) {
|
(al::isNerve(this, &NrvCitySignal.WaitRed) || al::isNerve(this, &NrvCitySignal.WaitBlue))) {
|
||||||
al::setNerve(this, &NrvCitySignal.WaitOff);
|
al::setNerve(this, &NrvCitySignal.WaitOff);
|
||||||
return true;
|
return true;
|
||||||
|
@ -9,8 +9,8 @@ public:
|
|||||||
void init(const al::ActorInitInfo& info) override;
|
void init(const al::ActorInitInfo& info) override;
|
||||||
void movement() override;
|
void movement() override;
|
||||||
void calcAnim() override;
|
void calcAnim() override;
|
||||||
bool receiveMsg(const al::SensorMsg* message, al::HitSensor* source,
|
bool receiveMsg(const al::SensorMsg* message, al::HitSensor* other,
|
||||||
al::HitSensor* target) override;
|
al::HitSensor* self) override;
|
||||||
|
|
||||||
void exeWaitRed();
|
void exeWaitRed();
|
||||||
void exeWaitBlue();
|
void exeWaitBlue();
|
||||||
|
@ -49,12 +49,12 @@ void FireDrum2D::exeBurn() {
|
|||||||
al::setNerve(this, &Wait);
|
al::setNerve(this, &Wait);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FireDrum2D::attackSensor(al::HitSensor* source, al::HitSensor* target) {
|
void FireDrum2D::attackSensor(al::HitSensor* self, al::HitSensor* other) {
|
||||||
if (rs::sendMsgTouchFireDrum2D(target, source) || rs::sendMsgEnemyAttack2D(target, source))
|
if (rs::sendMsgTouchFireDrum2D(other, self) || rs::sendMsgEnemyAttack2D(other, self))
|
||||||
al::setNerve(this, &Burn);
|
al::setNerve(this, &Burn);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FireDrum2D::receiveMsg(const al::SensorMsg* message, al::HitSensor* source,
|
bool FireDrum2D::receiveMsg(const al::SensorMsg* message, al::HitSensor* other,
|
||||||
al::HitSensor* target) {
|
al::HitSensor* self) {
|
||||||
return al::isMsgPlayerDisregard(message);
|
return al::isMsgPlayerDisregard(message);
|
||||||
}
|
}
|
||||||
|
@ -14,9 +14,9 @@ class FireDrum2D : public al::LiveActor, public IUseDimension {
|
|||||||
public:
|
public:
|
||||||
FireDrum2D(const char* name);
|
FireDrum2D(const char* name);
|
||||||
void init(const al::ActorInitInfo& info) override;
|
void init(const al::ActorInitInfo& info) override;
|
||||||
void attackSensor(al::HitSensor* target, al::HitSensor* source) override;
|
void attackSensor(al::HitSensor* self, al::HitSensor* other) override;
|
||||||
bool receiveMsg(const al::SensorMsg* message, al::HitSensor* source,
|
bool receiveMsg(const al::SensorMsg* message, al::HitSensor* other,
|
||||||
al::HitSensor* target) override;
|
al::HitSensor* self) override;
|
||||||
|
|
||||||
void exeWait();
|
void exeWait();
|
||||||
void exeBurn();
|
void exeBurn();
|
||||||
|
@ -145,25 +145,24 @@ void Player::control() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// NON_MATCHING: issue with getting actorTrans
|
// NON_MATCHING: issue with getting actorTrans
|
||||||
void Player::attackSensor(al::HitSensor* target, al::HitSensor* source) {
|
void Player::attackSensor(al::HitSensor* self, al::HitSensor* other) {
|
||||||
const sead::Vector3f& actorTransRef = al::getActorTrans(source);
|
const sead::Vector3f& actorTransRef = al::getActorTrans(other);
|
||||||
const sead::Vector3f& transRef = al::getTrans(this);
|
const sead::Vector3f& transRef = al::getTrans(this);
|
||||||
sead::Vector3f actorTrans = actorTransRef;
|
sead::Vector3f actorTrans = actorTransRef;
|
||||||
sead::Vector3f trans = transRef;
|
sead::Vector3f trans = transRef;
|
||||||
|
|
||||||
if ((al::isNerve(this, &NrvPlayer.Jump) || al::isNerve(this, &NrvPlayer.Fall)) &&
|
if ((al::isNerve(this, &NrvPlayer.Jump) || al::isNerve(this, &NrvPlayer.Fall)) &&
|
||||||
(al::isSensorEnemy(source) || al::isSensorPlayer(source)) &&
|
(al::isSensorEnemy(other) || al::isSensorPlayer(other)) &&
|
||||||
(al::getVelocity(this).dot(al::getGravity(this)) > 0.0f) &&
|
(al::getVelocity(this).dot(al::getGravity(this)) > 0.0f) &&
|
||||||
((actorTrans - trans).dot(al::getGravity(this)) > 0.0f) &&
|
((actorTrans - trans).dot(al::getGravity(this)) > 0.0f) &&
|
||||||
al::sendMsgPlayerAttackTrample(source, target, nullptr))
|
al::sendMsgPlayerAttackTrample(other, self, nullptr))
|
||||||
al::setVelocityJump(this, 23.0f);
|
al::setVelocityJump(this, 23.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Player::receiveMsg(const al::SensorMsg* message, al::HitSensor* source,
|
bool Player::receiveMsg(const al::SensorMsg* message, al::HitSensor* other, al::HitSensor* self) {
|
||||||
al::HitSensor* target) {
|
|
||||||
if (al::isMsgPlayerTrample(message) || al::isMsgEnemyAttack(message)) {
|
if (al::isMsgPlayerTrample(message) || al::isMsgEnemyAttack(message)) {
|
||||||
if (!al::isNerve(this, &Damage)) {
|
if (!al::isNerve(this, &Damage)) {
|
||||||
sead::Vector3f offset = al::getTrans(this) - al::getSensorPos(source);
|
sead::Vector3f offset = al::getTrans(this) - al::getSensorPos(other);
|
||||||
al::verticalizeVec(&offset, al::getGravity(this), offset);
|
al::verticalizeVec(&offset, al::getGravity(this), offset);
|
||||||
al::tryNormalizeOrZero(&offset);
|
al::tryNormalizeOrZero(&offset);
|
||||||
|
|
||||||
|
@ -15,9 +15,9 @@ public:
|
|||||||
void exeDamage();
|
void exeDamage();
|
||||||
|
|
||||||
void control() override;
|
void control() override;
|
||||||
void attackSensor(al::HitSensor* target, al::HitSensor* source) override;
|
void attackSensor(al::HitSensor* self, al::HitSensor* other) override;
|
||||||
bool receiveMsg(const al::SensorMsg* message, al::HitSensor* source,
|
bool receiveMsg(const al::SensorMsg* message, al::HitSensor* other,
|
||||||
al::HitSensor* target) override;
|
al::HitSensor* self) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const char* mArchiveName = nullptr;
|
const char* mArchiveName = nullptr;
|
||||||
|
Loading…
Reference in New Issue
Block a user