mirror of
https://github.com/OpenDriver2/REDRIVER2.git
synced 2024-11-25 20:02:33 +01:00
- minor order change in ConvertTorqueToAngularAcceleration
This commit is contained in:
parent
c0dd470d7b
commit
05dcc49b19
@ -174,11 +174,11 @@ void ConvertTorqueToAngularAcceleration(CAR_DATA* cp, CAR_LOCALS* cl)
|
|||||||
twistY = car_cosmetics[cp->ap.model].twistRateY;
|
twistY = car_cosmetics[cp->ap.model].twistRateY;
|
||||||
twistZ = car_cosmetics[cp->ap.model].twistRateZ;
|
twistZ = car_cosmetics[cp->ap.model].twistRateZ;
|
||||||
|
|
||||||
zd = FIXEDH(cp->hd.where.m[0][2] * cp->hd.aacc[0] + cp->hd.where.m[1][2] * cp->hd.aacc[1] + cp->hd.where.m[2][2] * cp->hd.aacc[2]);
|
zd = (twistZ - twistY) * FIXEDH(cp->hd.where.m[0][2] * cp->hd.aacc[0] + cp->hd.where.m[1][2] * cp->hd.aacc[1] + cp->hd.where.m[2][2] * cp->hd.aacc[2]);
|
||||||
|
|
||||||
for (i = 0; i < 3; i++)
|
for (i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
cp->hd.aacc[i] = cp->hd.aacc[i] * twistY + FIXEDH(cp->hd.where.m[i][2] * (twistZ - twistY) * zd - cl->avel[i] * 128);
|
cp->hd.aacc[i] = cp->hd.aacc[i] * twistY + FIXEDH(cp->hd.where.m[i][2] * zd - cl->avel[i] * 128);
|
||||||
|
|
||||||
if (cl->extraangulardamping == 1)
|
if (cl->extraangulardamping == 1)
|
||||||
cp->hd.aacc[i] -= cl->avel[i] / 8;
|
cp->hd.aacc[i] -= cl->avel[i] / 8;
|
||||||
|
Loading…
Reference in New Issue
Block a user