mirror of
https://github.com/halpz/re3.git
synced 2024-12-25 18:05:27 +00:00
Fix ped buoyancy
This commit is contained in:
parent
f60e3d667a
commit
ab071163e5
|
@ -17003,9 +17003,10 @@ CPed::ProcessBuoyancy(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
float speedMult = 0.0f;
|
float speedMult = 0.0f;
|
||||||
if (buoyancyImpulse.z / m_fMass > GRAVITY * CTimer::GetTimeStep()
|
if (buoyancyImpulse.z / m_fMass > GRAVITY * CTimer::GetTimeStep()
|
||||||
|| mod_Buoyancy.m_waterlevel > GetPosition().z) {
|
|| mod_Buoyancy.m_waterlevel > GetPosition().z + 0.6f) {
|
||||||
speedMult = pow(0.9f, CTimer::GetTimeStep());
|
speedMult = pow(0.9f, CTimer::GetTimeStep());
|
||||||
m_vecMoveSpeed.x *= speedMult;
|
m_vecMoveSpeed.x *= speedMult;
|
||||||
m_vecMoveSpeed.y *= speedMult;
|
m_vecMoveSpeed.y *= speedMult;
|
||||||
|
@ -17036,11 +17037,6 @@ CPed::ProcessBuoyancy(void)
|
||||||
nGenerateWaterCircles = CTimer::GetTimeInMilliseconds() + 100;
|
nGenerateWaterCircles = CTimer::GetTimeInMilliseconds() + 100;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else
|
|
||||||
return;
|
|
||||||
} else
|
|
||||||
bTouchingWater = false;
|
|
||||||
|
|
||||||
if (nGenerateWaterCircles && CTimer::GetTimeInMilliseconds() >= nGenerateWaterCircles) {
|
if (nGenerateWaterCircles && CTimer::GetTimeInMilliseconds() >= nGenerateWaterCircles) {
|
||||||
CVector pos = GetPosition();
|
CVector pos = GetPosition();
|
||||||
float level = 0.0f;
|
float level = 0.0f;
|
||||||
|
@ -17056,7 +17052,6 @@ CPed::ProcessBuoyancy(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nGenerateRaindrops && CTimer::GetTimeInMilliseconds() >= nGenerateRaindrops) {
|
if (nGenerateRaindrops && CTimer::GetTimeInMilliseconds() >= nGenerateRaindrops) {
|
||||||
CVector pos = GetPosition();
|
CVector pos = GetPosition();
|
||||||
float level = 0.0f;
|
float level = 0.0f;
|
||||||
|
@ -17069,6 +17064,8 @@ CPed::ProcessBuoyancy(void)
|
||||||
CParticleObject::AddObject(POBJECT_SPLASHES_AROUND, pos, CVector(0.0f, 0.0f, 0.0f), 4.5f, 1500, CRGBA(0,0,0,0), true);
|
CParticleObject::AddObject(POBJECT_SPLASHES_AROUND, pos, CVector(0.0f, 0.0f, 0.0f), 4.5f, 1500, CRGBA(0,0,0,0), true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else
|
||||||
|
bTouchingWater = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// --MIAMI: Done
|
// --MIAMI: Done
|
||||||
|
|
Loading…
Reference in a new issue