mirror of
https://gitlab.com/GaryOderNichts/re3-wiiu.git
synced 2024-12-23 16:21:50 +01:00
minor stuff
This commit is contained in:
parent
016ebc0b00
commit
95e96c86a1
@ -60,6 +60,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Slerp(const CQuaternion &q1, const CQuaternion &q2, float theta, float invSin, float t);
|
void Slerp(const CQuaternion &q1, const CQuaternion &q2, float theta, float invSin, float t);
|
||||||
|
void Set(RwV3d *axis, float angle);
|
||||||
void Get(RwMatrix *matrix);
|
void Get(RwMatrix *matrix);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -183,6 +183,17 @@ CQuaternion::Slerp(const CQuaternion &q1, const CQuaternion &q2, float theta, fl
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
CQuaternion::Set(RwV3d *axis, float angle)
|
||||||
|
{
|
||||||
|
float halfCos = Cos(angle*0.5f);
|
||||||
|
float halfSin = Sin(angle*0.5f);
|
||||||
|
x = axis->x*halfSin;
|
||||||
|
y = axis->y*halfSin;
|
||||||
|
z = axis->z*halfSin;
|
||||||
|
w = halfCos;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
CQuaternion::Get(RwMatrix *matrix)
|
CQuaternion::Get(RwMatrix *matrix)
|
||||||
{
|
{
|
||||||
|
@ -220,6 +220,7 @@ void
|
|||||||
CAutomobile::ProcessControl(void)
|
CAutomobile::ProcessControl(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
float wheelRot;
|
||||||
CColModel *colModel;
|
CColModel *colModel;
|
||||||
|
|
||||||
if(bUsingSpecialColModel)
|
if(bUsingSpecialColModel)
|
||||||
@ -372,11 +373,9 @@ CAutomobile::ProcessControl(void)
|
|||||||
|
|
||||||
pHandling->Transmission.CalculateGearForSimpleCar(AutoPilot.m_fMaxTrafficSpeed/50.0f, m_nCurrentGear);
|
pHandling->Transmission.CalculateGearForSimpleCar(AutoPilot.m_fMaxTrafficSpeed/50.0f, m_nCurrentGear);
|
||||||
|
|
||||||
{
|
wheelRot = ProcessWheelRotation(WHEEL_STATE_NORMAL, GetForward(), m_vecMoveSpeed, 0.35f);
|
||||||
float wheelRot = ProcessWheelRotation(WHEEL_STATE_NORMAL, GetForward(), m_vecMoveSpeed, 0.35f);
|
|
||||||
for(i = 0; i < 4; i++)
|
for(i = 0; i < 4; i++)
|
||||||
m_aWheelRotation[i] += wheelRot;
|
m_aWheelRotation[i] += wheelRot;
|
||||||
}
|
|
||||||
|
|
||||||
PlayHornIfNecessary();
|
PlayHornIfNecessary();
|
||||||
ReduceHornCounter();
|
ReduceHornCounter();
|
||||||
@ -618,7 +617,7 @@ CAutomobile::ProcessControl(void)
|
|||||||
for(i = 0; i < 4; i++){
|
for(i = 0; i < 4; i++){
|
||||||
if(m_aSuspensionSpringRatio[i] < 1.0f){
|
if(m_aSuspensionSpringRatio[i] < 1.0f){
|
||||||
float bias = pHandling->fSuspensionBias;
|
float bias = pHandling->fSuspensionBias;
|
||||||
if(i == 1 || i == 3) // rear
|
if(i == CARWHEEL_REAR_LEFT || i == CARWHEEL_REAR_RIGHT)
|
||||||
bias = 1.0f - bias;
|
bias = 1.0f - bias;
|
||||||
|
|
||||||
ApplySpringCollision(pHandling->fSuspensionForceLevel,
|
ApplySpringCollision(pHandling->fSuspensionForceLevel,
|
||||||
|
Loading…
Reference in New Issue
Block a user