mirror of
https://git.rip/DMCA_FUCKER/re3.git
synced 2024-12-23 08:20:00 +00: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_vecMoveSpeed *= fTimeStep;
|
||||||
m_vecTurnSpeed *= 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) {
|
&& (CGeneral::GetRandomNumber() & 0x1F) == 10) {
|
||||||
bExplosionProof = true;
|
bExplosionProof = true;
|
||||||
bIsVisible = false;
|
bIsVisible = false;
|
||||||
|
@ -115,6 +116,13 @@ CObject::ProcessControl(void)
|
||||||
bAffectedByGravity = false;
|
bAffectedByGravity = false;
|
||||||
m_vecMoveSpeed = CVector(0.0f, 0.0f, 0.0f);
|
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
|
void
|
||||||
|
|
Loading…
Reference in a new issue