Bounce implementation

This commit is contained in:
Phillip Stephens 2016-02-13 22:23:03 -08:00
parent ae900345fe
commit 43986b922b
1 changed files with 11 additions and 1 deletions

View File

@ -129,7 +129,7 @@ bool CMVEBounce::GetValue(int frame, Zeus::CVector3f& pVel, Zeus::CVector3f& pPo
float dot = x18_g.dot(pPos); float dot = x18_g.dot(pPos);
if ((dot - x24_j) <= 0.0f) if ((dot - x24_j) <= 0.0f)
{ {
if (!x15_f) if (x15_f)
return true; return true;
} }
else else
@ -139,7 +139,17 @@ bool CMVEBounce::GetValue(int frame, Zeus::CVector3f& pVel, Zeus::CVector3f& pPo
return false; return false;
Zeus::CVector3f delta = pPos - pVel; Zeus::CVector3f delta = pPos - pVel;
pPos.x += ((-((((delta.z * ((delta.x * (delta.y * x18_g.y)) + ((pVel.x * (x18_g.y * pVel.y)) + x18_g.x))) + x18_g.z) - x24_j)) / ((pVel.z * ((pVel.x * (x18_g.y * pVel.y)) + x18_g.x)) + x18_g.z)) - ((x18_g.z * ((x18_g.x * (x18_g.y * pVel.y)) + pVel.x)) + pVel.z)) * pVel.x;
pPos.y += ((-((((delta.z * ((delta.x * (delta.y * x18_g.y)) + ((pVel.x * (x18_g.y * pVel.y)) + x18_g.x))) + x18_g.z) - x24_j)) / ((pVel.z * ((pVel.x * (x18_g.y * pVel.y)) + x18_g.x)) + x18_g.z)) - ((x18_g.z * ((x18_g.x * (x18_g.y * pVel.y)) + pVel.x)) + pVel.z)) * pVel.y;
pPos.z += ((-((((delta.z * ((delta.x * (delta.y * x18_g.y)) + ((pVel.x * (x18_g.y * pVel.y)) + x18_g.x))) + x18_g.z) - x24_j)) / ((pVel.z * ((pVel.x * (x18_g.y * pVel.y)) + x18_g.x)) + x18_g.z)) - ((x18_g.z * ((x18_g.x * (x18_g.y * pVel.y)) + pVel.x)) + pVel.z)) * pVel.z;
float d = 0.0f;
x10_d->GetValue(frame, d);
pVel -= d * pVel;
float c = 0.0f;
xc_c->GetValue(frame, c);
pVel -= Zeus::CVector3f{(1.0f + c) * ((x18_g.z * (x18_g.x * (x18_g.y * pVel.y)) + pVel.x) + pVel.x)} * x18_g;
return false; return false;
} }