-
-
Notifications
You must be signed in to change notification settings - Fork 493
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
Wind: Affect Tux on ground + Fancy Particles Option #1493
Conversation
Really nice!! I like it!
This is a typo, right? 😅 |
For some reason the new wind-images were not in-game in my build (maybe because you used [ci skip] ), apart from that it looks very good. The "affect badguys"-part itself is worth the merge. |
Nevermind, the last part with the badguys was already part of an other PR. |
data/images/particles/wind.sprite
Outdated
"windup2.png" | ||
"windup3.png") | ||
) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a new line after this.
@@ -69,8 +75,9 @@ Wind::get_settings() | |||
result.add_float(_("Acceleration"), &acceleration, "acceleration"); | |||
result.add_bool(_("Blowing"), &blowing, "blowing", true); | |||
result.add_bool(_("Affects Badguys"), &affects_badguys, "affects-badguys", false); | |||
result.add_bool(_("Fancy Particles"), &fancy_wind, "fancy-wind", false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about what others might think, but I consider the name "Fancy Particles" to not be verbose enough.
src/object/wind.cpp
Outdated
if (badguy->can_be_affected_by_wind()) { | ||
if (badguy && this->affects_badguys) | ||
{ | ||
if (badguy->can_be_affected_by_wind()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could concatenate both of those if statements.
@@ -0,0 +1,26 @@ | |||
(supertux-sprite |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please check the indentation of this file and fix it (because if we merge it now, this won't happen)
Oh, and add [ci skip]
after your commit message so that we don't waste unnecessary integration cycles.
src/object/wind.cpp
Outdated
LAYER_BACKGROUNDTILES+1); | ||
if (fancy_wind) | ||
{ | ||
Sector::get().add<SpriteParticle>("images/particles/wind.sprite", (abs(speed.x) > abs(speed.y)) ? "default" : "flip", ppos, ANCHOR_MIDDLE, pspeed, Vector(0, 0), LAYER_BACKGROUNDTILES+1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if maybe you should move the (abs(speed.x) > abs(speed.y)) ? "default" : "flip"
into its own variable. The line is quite long. Also, add spaces around the +
Yes, sorry for being mean and stricter than necessary, but that's just me being a good code reviewer. No hard feelings.
Merging as per suggestion of someone in the Riot channel. |
* New wind images * Updated wind * fix odd formatting * Formatting * Conversions(?) * More conversions * More conversions * Update wind.sprite * Update wind * Indentation * Spaces
This PR adds a few things:
A preview: https://www.youtube.com/watch?v=RbmOd7azlns
The particles are optional because there are some instances in which the particles look bad, such as in diagonal wind or in small zones where it may not be needed.
Reviews are encouraged. :-)