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
2 changes: 1 addition & 1 deletion props/blaster_BC_buttons.h
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ void Loop() override {
}

// Blaster effects, auto fire is handled by begin/end lockup
void SB_Effect(EffectType effect, float location) override {
void SB_Effect2(EffectType effect, float location) {
Copy link
Owner

Choose a reason for hiding this comment

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

Still needs "override"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh, I see now what the issue was. It wasn't compiling, said it was marked override but didn't override. Seemed odd since it's overriding already in the Blaster class and we're inheriting from there. But I found it worked as SB_Effect2, so thought that was the right move.
The actual issue was the addition of EffectLocation since this was last worked on. changing float to EffectLocation makes things right now.
If I understand correctly, it only "needs" to be SB_Effect2 if we were trying to get sound lengths for example.

Copy link
Owner

Choose a reason for hiding this comment

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

Correct.
Generally SB_Effect() is the right place to play sounds, and SB_Effect2() is the right place to do something after that.

switch (effect) {
default: return;
case EFFECT_STUN: hybrid_font.PlayCommon(&SFX_stun); return;
Expand Down