This is an automated email from the git hooks/post-receive script. odyx pushed a commit to branch upstream/latest in repository colobot.
commit 0ce72bdce06eb0694ccd821b1b4f268a6c65e2b0 Author: krzys-h <krzy...@interia.pl> Date: Sun Mar 29 20:30:29 2015 +0200 ovf's OCD > ovf: krzys_h: i'm sorry, your last commit triggered a random ocd fit. http://vpaste.net/S6u62 > ovf: (you don't need to apply this, i already feel better now) --- src/object/robotmain.cpp | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/src/object/robotmain.cpp b/src/object/robotmain.cpp index 088abd3..4b5304f 100644 --- a/src/object/robotmain.cpp +++ b/src/object/robotmain.cpp @@ -2125,17 +2125,12 @@ CObject* CRobotMain::DetectObject(Math::Point pos) { target = obj; } - else if ((type == OBJECT_POWER || - type == OBJECT_ATOMIC) && - obj->GetTruck() != nullptr) // battery used? - { - target = obj->GetTruck(); - } - else if (type == OBJECT_POWER || - type == OBJECT_ATOMIC) - { - target = obj; - } + + else if (type == OBJECT_POWER || type == OBJECT_ATOMIC) + { + target = obj->GetTruck(); // battery connected + if (!target) target = obj; // standalone battery + } for (int j = 0; j < OBJECTMAXPART; j++) { -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/colobot.git _______________________________________________ Pkg-games-commits mailing list Pkg-games-commits@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits