Fix dumb bug in atmospheric drag calc, restore previous behaviour

master
John Jordan 2013-01-03 01:52:32 +00:00
parent ad49fa949a
commit 3610a2897b
2 changed files with 2 additions and 6 deletions

View File

@ -114,7 +114,6 @@ void DynamicBody::CalcExternalForce()
m_gravityForce = m_externalForce;
// atmospheric drag
m_atmosForce = vector3d(0.0);
if (GetFrame()->IsRotFrame() && body->IsType(Object::PLANET))
{
Planet *planet = static_cast<Planet*>(body);
@ -122,7 +121,7 @@ void DynamicBody::CalcExternalForce()
double speed = m_vel.Length();
double pressure, density;
planet->GetAtmosphericState(dist, &pressure, &density);
const double radius = GetPhysRadius();
const double radius = GetClipRadius(); // bogus, preserving behaviour
const double AREA = radius;
// ^^^ yes that is as stupid as it looks
const double DRAG_COEFF = 0.1; // 'smooth sphere'
@ -137,6 +136,7 @@ void DynamicBody::CalcExternalForce()
m_externalForce += m_atmosForce;
}
else m_atmosForce = vector3d(0.0);
// centrifugal and coriolis forces for rotating frames
vector3d angRot(0, GetFrame()->GetAngSpeed(), 0);

View File

@ -2134,10 +2134,6 @@
RelativePath="..\..\src\gameconsts.h"
>
</File>
<File
RelativePath="..\..\src\GameLoaderSaver.cpp"
>
</File>
<File
RelativePath="..\..\src\GameLoaderSaver.h"
>