-
Notifications
You must be signed in to change notification settings - Fork 132
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
[MASTER] Fix Issue #82 - Pushed boulder can collide with pusher #201
base: master
Are you sure you want to change the base?
[MASTER] Fix Issue #82 - Pushed boulder can collide with pusher #201
Conversation
src/actboulder.cpp
Outdated
@@ -235,7 +296,7 @@ void actBoulder(Entity* my) | |||
{ | |||
continue; | |||
} | |||
if ( boulderCheckAgainstEntity(my, entity) ) | |||
if ( BoulderCheckAgainstEntity(my, entity) ) |
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.
Compile error in VS, needs 3 arguments:
Error C2660 'BoulderCheckAgainstEntity': function does not take 2 arguments
bool BoulderCheckAgainstEntity(Entity* const my, Entity* const entity, const bool bWasBoulderPushed)
src/actboulder.cpp
Outdated
@@ -338,7 +399,7 @@ void actBoulder(Entity* my) | |||
{ | |||
continue; | |||
} | |||
if ( boulderCheckAgainstEntity(my, entity) ) | |||
if ( BoulderCheckAgainstEntity(my, entity) ) |
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.
Compile error in VS, needs 3 arguments:
Error C2660 'BoulderCheckAgainstEntity': function does not take 2 arguments
bool BoulderCheckAgainstEntity(Entity* const my, Entity* const entity, const bool bWasBoulderPushed)
src/actboulder.cpp
Outdated
@@ -507,7 +568,7 @@ void actBoulder(Entity* my) | |||
{ | |||
continue; | |||
} | |||
if ( boulderCheckAgainstEntity(my, entity) ) | |||
if ( BoulderCheckAgainstEntity(my, entity) ) |
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.
Compile error in VS, needs 3 arguments:
Error C2660 'BoulderCheckAgainstEntity': function does not take 2 arguments
bool BoulderCheckAgainstEntity(Entity* const my, Entity* const entity, const bool bWasBoulderPushed)
My bad. I rushed the new PR and messed it up. Will fix today.
null
|
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.
Code looks good, several minor instances of redundancy though.
src/collision.cpp
Outdated
} | ||
} | ||
return false; | ||
break; |
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.
A break right after a return is redundant
I'll investigate this edge case.
null
|
Code looks good, several minor instances of redundancy though.
Yep! Must have forgotten to remove it. VS doesn't flag the "any code past a return will not be executed". Will fix today.
|
@WALLOFJUSTICE I was able to partially replicate your issue twice. I do not know of a way to reliably reproduce it. In both of my cases, I was prevented from moving left, however I could simply move backwards or to move right in order to break free. A better solution would be to calculate the path of the boulder ahead of time, which I thought of, but that could cause an excessive amount of issues with things moving out of the way or into the way of a rolling boulder. |
This fixes the massive jump boulders will make when pushing them into entities
…a solid tile Note: It is very likely and possible that this could increase/cause the clipping issues where a player will be partially inside of a boulder. That issue has to be solved separately. This commit fixes issues where the boulder is in a semi-moved state.
See #159.