-
-
Notifications
You must be signed in to change notification settings - Fork 494
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
Various crusher fixes #3047
base: master
Are you sure you want to change the base?
Various crusher fixes #3047
Changes from 2 commits
016b8a4
4820569
400b823
fe6acaf
6db5648
d10fc53
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -185,6 +185,7 @@ Player::Player(PlayerStatus& player_status, const std::string& name_, int player | |
m_jump_early_apex(false), | ||
m_on_ice(false), | ||
m_ice_this_frame(false), | ||
m_ignore_sideways_crush(false), | ||
//m_santahatsprite(SpriteManager::current()->create("images/creatures/tux/santahat.sprite")), | ||
m_multiplayer_arrow(SpriteManager::current()->create("images/engine/hud/arrowdown.png")), | ||
m_tag_timer(), | ||
|
@@ -2324,8 +2325,13 @@ Player::collision_solid(const CollisionHit& hit) | |
|
||
// crushed? | ||
if (hit.crush) { | ||
if (hit.left || hit.right) { | ||
kill(true); | ||
if ((hit.left || hit.right)) { | ||
if (m_ignore_sideways_crush) { | ||
m_ignore_sideways_crush = false; | ||
} | ||
else { | ||
kill(true); | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If tux isn't killed immediately when crushed vertically, then why can't it also happen here? This way you remove the ignore_sidways_crush thing. But I might be missing something There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Couldn't we make it so that despite of the side where Tux was hit from, If we do that, |
||
} else if (hit.top || hit.bottom) { | ||
kill(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.
This comment doesn't reflect the changes (sideways collision also now hurts the player).