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

Bug fixes #75

Merged
merged 4 commits into from Aug 27, 2013
Merged

Bug fixes #75

merged 4 commits into from Aug 27, 2013

Conversation

ferencbarta
Copy link
Contributor

No description provided.

Added a test to check the existence of the file without appending
extension to the filename, so now OGXmlConfig and its descendant classes
will load files even if the extension is already given in the filename
OGBall::FindTarget() sets pTargetBall_ to 0, when no target
can be found, which is dereferenced in OGBall::IsCanClimb()
and OGBall::Move().
It was possible to open the pipe by catching a falling ball
inside the sensor, then attaching it anywhere, because in
OGContactListener::BeginContact() and OGContactListener::EndContact()
the same method was called and OGSensor::BeginContact() runs after
attaching the ball. The new member in OGUserData won't let sensors
balls_ decrease when doing the same (OGSensor::EndContact() is also
called after attaching) and avoids the pipe to remain open if a ball
enters the sensor attached but leaves unattached.
Setting the isTouching false in OGExitSensor::_EndContact() avoids
the force to keep applied if the ball was pulled away from the pipe.
Climb target and origin are updated in OGBall::Move(), then balls
are repositioned in OGClimb::onTargetChanged() if needed. It won't
move the ball if OGClimb::initNewTarget() was called before updating,
instead we can set a new origin and target, like in
OGBall::Algorithm2(). In this case, OGClimb::onOriginChanged() will
calculate the originCorrection, which is needed because usually when
we set the new origin, the origin ball and our ball won't be in the
same position. That would make our ball jump this distance, if we
wouldn't add the originCorrection to the origin in
OGClimb::onTargetChanged().
batarov added a commit that referenced this pull request Aug 27, 2013
@batarov batarov merged commit 9a5043a into Mandarancio:master Aug 27, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants