Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add blaster_BC_buttons #582

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
1 change: 1 addition & 0 deletions common/saber_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ extern SaberBase* saberbases;
DEFINE_EFFECT(UNJAM) \
DEFINE_EFFECT(PLI_ON) \
DEFINE_EFFECT(PLI_OFF) \
DEFINE_EFFECT(DESTRUCT) \
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self-destruct is usually an off-type rather than an effect...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is,

        case NEXT_ACTION_BLOW:
          Off(OFF_BLAST);
          break;

But having EFFECT_DESTRUCT allows for blade animations.

/* Mini game effects */ \
DEFINE_EFFECT(GAME_START) \
DEFINE_EFFECT(GAME_ACTION1) \
Expand Down
4 changes: 2 additions & 2 deletions props/blaster.h
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ class Blaster : public PROP_INHERIT_PREFIX PropBase {
SetNextAction(what, when * 1000);
}

void PollNextAction() {
virtual void PollNextAction() {
if (millis() - time_base_ > next_event_time_) {
switch (next_action_) {
case NEXT_ACTION_NOTHING:
Expand Down Expand Up @@ -307,7 +307,7 @@ class Blaster : public PROP_INHERIT_PREFIX PropBase {
SetNextActionF(NEXT_ACTION_ARM, len);
}

void selfDestruct() {
virtual void selfDestruct() {
SaberBase::DoEndLockup();
#ifdef ENABLE_AUDIO
float len = hybrid_font.GetCurrentEffectLength();
Expand Down
Loading