Clamp energy level to standard values for OrgaShooters

Fix issue #1009
1008-fix
tomangelo2 2017-10-16 20:29:59 +02:00
parent f40756bc46
commit dab223e6ce
1 changed files with 1 additions and 0 deletions

View File

@ -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;