mirror of
https://github.com/GTAmodding/re3.git
synced 2024-11-29 12:23:43 +00:00
fixed car handling!!!!!!!
This commit is contained in:
parent
0c55f331cf
commit
7374fbf54c
2 changed files with 4 additions and 4 deletions
|
@ -973,8 +973,8 @@ CAutomobile::ProcessControl(void)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static float magicValue = 4.0f;
|
static float magicValue = 4.0f;
|
||||||
float steerRange;
|
|
||||||
if(magicValue > 0.0f){
|
if(magicValue > 0.0f){
|
||||||
|
float steerRange;
|
||||||
// looks like a bug with the wheel ids here, why only left wheels?
|
// looks like a bug with the wheel ids here, why only left wheels?
|
||||||
if(fwdSpeed > 0.01f && (m_aWheelTimer[CARWHEEL_FRONT_LEFT] > 0.0f || m_aWheelTimer[CARWHEEL_REAR_LEFT] > 0.0f) && GetStatus() == STATUS_PLAYER){
|
if(fwdSpeed > 0.01f && (m_aWheelTimer[CARWHEEL_FRONT_LEFT] > 0.0f || m_aWheelTimer[CARWHEEL_REAR_LEFT] > 0.0f) && GetStatus() == STATUS_PLAYER){
|
||||||
CColPoint point;
|
CColPoint point;
|
||||||
|
@ -995,9 +995,9 @@ CAutomobile::ProcessControl(void)
|
||||||
|
|
||||||
}else
|
}else
|
||||||
steerRange = 1.0f;
|
steerRange = 1.0f;
|
||||||
}
|
|
||||||
|
|
||||||
m_fSteerAngle *= steerRange;
|
m_fSteerAngle *= steerRange;
|
||||||
|
}
|
||||||
|
|
||||||
brake = m_fBrakePedal * pHandling->fBrakeDeceleration * CTimer::GetTimeStep();
|
brake = m_fBrakePedal * pHandling->fBrakeDeceleration * CTimer::GetTimeStep();
|
||||||
|
|
||||||
|
|
|
@ -965,7 +965,7 @@ CVehicle::ProcessWheel(CVector &wheelFwd, CVector &wheelRight, CVector &wheelCon
|
||||||
turnDirection = direction;
|
turnDirection = direction;
|
||||||
|
|
||||||
float impulse = speed*m_fMass;
|
float impulse = speed*m_fMass;
|
||||||
float turnImpulse = turnSpeed*GetMass(wheelContactPoint, turnDirection);
|
float turnImpulse = turnSpeed*GetMass(wheelContactPoint - Multiply3x3(GetMatrix(), m_vecCentreOfMass), turnDirection);
|
||||||
|
|
||||||
ApplyMoveForce(impulse * direction);
|
ApplyMoveForce(impulse * direction);
|
||||||
ApplyTurnForce(turnImpulse * turnDirection, wheelContactPoint);
|
ApplyTurnForce(turnImpulse * turnDirection, wheelContactPoint);
|
||||||
|
|
Loading…
Reference in a new issue