| 1 | #include "MapObj/PictureNoStageChange.h" |
| 2 | |
| 3 | #include "Library/LiveActor/ActorInitUtil.h" |
| 4 | #include "Library/Nerve/NerveSetupUtil.h" |
| 5 | |
| 6 | #include "Util/SensorMsgFunction.h" |
| 7 | |
| 8 | namespace { |
| 9 | NERVE_IMPL(PictureNoStageChange, Wait); |
| 10 | NERVES_MAKE_NOSTRUCT(PictureNoStageChange, Wait); |
| 11 | } // namespace |
| 12 | |
| 13 | PictureNoStageChange::PictureNoStageChange(const char* actorName, const char* archiveName) |
| 14 | : al::LiveActor(actorName), mArchiveName(archiveName) {} |
| 15 | |
| 16 | void PictureNoStageChange::init(const al::ActorInitInfo& info) { |
| 17 | al::initActorWithArchiveName(actor: this, initInfo: info, archiveName: mArchiveName, suffix: nullptr); |
| 18 | al::initNerve(actor: this, nerve: &Wait, maxStates: 0); |
| 19 | makeActorAlive(); |
| 20 | } |
| 21 | |
| 22 | bool PictureNoStageChange::receiveMsg(const al::SensorMsg* message, al::HitSensor* other, |
| 23 | al::HitSensor* self) { |
| 24 | if (rs::isMsgPlayerDisregardHomingAttack(message)) |
| 25 | return true; |
| 26 | return rs::isMsgPlayerDisregardTargetMarker(message); |
| 27 | } |
| 28 | |
| 29 | void PictureNoStageChange::exeWait() {} |
| 30 | |