mirror of
https://gitlab.com/GaryOderNichts/re3-wiiu.git
synced 2024-11-27 11:34:14 +01:00
Fix MI_RCBOMB gravity force and treat MI_PETROLPUMP2 as explosive
This commit is contained in:
parent
03ef438a72
commit
afe70003f4
@ -107,7 +107,8 @@ CObject::ProcessControl(void)
|
||||
m_vecMoveSpeed *= fTimeStep;
|
||||
m_vecTurnSpeed *= fTimeStep;
|
||||
}
|
||||
if ((GetModelIndex() == MI_EXPLODINGBARREL || GetModelIndex() == MI_PETROLPUMP) && bHasBeenDamaged && bIsVisible
|
||||
auto mi = GetModelIndex();
|
||||
if ((mi == MI_EXPLODINGBARREL || mi == MI_PETROLPUMP || mi == MI_PETROLPUMP2) && bHasBeenDamaged && bIsVisible
|
||||
&& (CGeneral::GetRandomNumber() & 0x1F) == 10) {
|
||||
bExplosionProof = true;
|
||||
bIsVisible = false;
|
||||
@ -115,6 +116,13 @@ CObject::ProcessControl(void)
|
||||
bAffectedByGravity = false;
|
||||
m_vecMoveSpeed = CVector(0.0f, 0.0f, 0.0f);
|
||||
}
|
||||
if (mi == MI_RCBOMB) {
|
||||
float fTurnForce = -(m_fTurnMass / 20.0f);
|
||||
CPhysical::ApplyTurnForce(m_vecMoveSpeed * fTurnForce, -GetForward());
|
||||
float fScalar = 1.0f - m_vecMoveSpeed.MagnitudeSqr() / 5.0f;
|
||||
float fScalarTimed = Pow(fScalar, CTimer::GetTimeStep());
|
||||
m_vecMoveSpeed *= fScalarTimed;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user