Remove unneeded code
This commit is contained in:
parent
35e52958f9
commit
11853ae170
2 changed files with 2 additions and 33 deletions
31
racing.h
31
racing.h
|
@ -1560,37 +1560,6 @@ uint32_t LCR_racingStep(unsigned int input)
|
|||
|
||||
_LCR_racingUpdateCarPosRot();
|
||||
|
||||
TPE_Unit angle = TPE_vec3Dot(carUp,TPE_vec3Normalized(TPE_vec3Minus(
|
||||
LCR_racing.carBody.joints[4].position,
|
||||
LCR_racing.carBody.joints[0].position)));
|
||||
|
||||
if (angle < TPE_F / 64) // TPE_F / 64 is a magic constant
|
||||
{
|
||||
LCR_LOG2("roof squeezed, applying anti force")
|
||||
|
||||
TPE_Vec3 tmpVec =
|
||||
TPE_vec3Times(carUp,LCR_PHYSICS_UNIT / 16); // 16: magic const.
|
||||
|
||||
angle = TPE_F - 4 * angle; // 4 comes from above TPE_F / 4
|
||||
tmpVec = TPE_vec3Times(tmpVec,angle);
|
||||
|
||||
if (angle <= 0)
|
||||
{
|
||||
LCR_LOG1("roof flipped over, fixing")
|
||||
LCR_racing.carBody.joints[4].position = _LCR_racingGetWheelCenterPoint();
|
||||
angle = 0;
|
||||
}
|
||||
|
||||
// Accelerate roof and wheels away from each other:
|
||||
|
||||
for (int i = 0; i < LCR_CAR_JOINTS; ++i)
|
||||
{
|
||||
LCR_racing.carBody.joints[i].velocity[0] += (i == 4 ? 1 : -1) * tmpVec.x;
|
||||
LCR_racing.carBody.joints[i].velocity[1] += (i == 4 ? 1 : -1) * tmpVec.y;
|
||||
LCR_racing.carBody.joints[i].velocity[2] += (i == 4 ? 1 : -1) * tmpVec.z;
|
||||
}
|
||||
}
|
||||
|
||||
int carBlock[3];
|
||||
|
||||
LCR_racingGetCarBlockCoords(carBlock);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue