[colobot] 37/62: Clamp energy level to standard values for OrgaShooters
Didier Raboud
odyx at moszumanska.debian.org
Fri Nov 10 11:53:57 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 dab223e6ce27a1df5671476ef63cfce9ae3a9627
Author: tomangelo2 <tomangelo at wp.pl>
Date: Mon Oct 16 20:29:59 2017 +0200
Clamp energy level to standard values for OrgaShooters
Fix issue #1009
---
src/object/motion/motionvehicle.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/object/motion/motionvehicle.cpp b/src/object/motion/motionvehicle.cpp
index b585171..14d46dc 100644
--- a/src/object/motion/motionvehicle.cpp
+++ b/src/object/motion/motionvehicle.cpp
@@ -1783,6 +1783,7 @@ bool CMotionVehicle::EventFrameCanoni(const Event &event)
float energy = GetObjectEnergyLevel(m_object);
if (energy == 0.0f) return true;
+ if (energy > 1.0f) energy = 1.0f; //fix issue with cheated cells, see issue #1009
factor = 0.5f+energy*0.5f;
if ( bOnBoard ) factor *= 0.8f;
--
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