[colobot] 28/62: Fixed goto() behaviour on 32-bit binaries
Didier Raboud
odyx at moszumanska.debian.org
Fri Nov 10 11:53:56 UTC 2017
This is an automated email from the git hooks/post-receive script.
odyx pushed a commit to branch debian/master
in repository colobot.
commit 0de347d430106ac3bf9df005aedb826076255e44
Author: tomangelo2 <tomangelo at wp.pl>
Date: Wed Jul 26 14:54:04 2017 +0200
Fixed goto() behaviour on 32-bit binaries
Closes issue #844
---
src/object/task/taskgoto.cpp | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/object/task/taskgoto.cpp b/src/object/task/taskgoto.cpp
index 5d6cd47..6584465 100644
--- a/src/object/task/taskgoto.cpp
+++ b/src/object/task/taskgoto.cpp
@@ -803,7 +803,8 @@ Error CTaskGoto::Start(Math::Vector goal, float altitude,
Error CTaskGoto::IsEnded()
{
Math::Vector pos;
- float limit, angle = 0.0f, dist, h, level;
+ float limit, angle = 0.0f, h, level;
+ volatile float dist; //fix for issue #844
if ( m_engine->GetPause() ) return ERR_CONTINUE;
if ( m_error != ERR_OK ) return m_error;
@@ -916,7 +917,9 @@ Error CTaskGoto::IsEnded()
if ( m_goalMode == TGG_EXPRESS )
{
dist = Math::DistanceProjected(m_goal, pos);
- if ( dist < 10.0f && dist > m_lastDistance )
+ float margin = 10.0f;
+ if ( m_object->Implements(ObjectInterfaceType::Flying) ) margin = 20.0f;
+ if ( dist < margin && dist > m_lastDistance )
{
return ERR_STOP;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/colobot.git
More information about the Pkg-games-commits
mailing list