2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 22:27:43 +00:00

More bug fixes

This commit is contained in:
Jack Andersen
2018-05-17 18:16:33 -10:00
parent 055c8e8a47
commit 979a54a8a8
18 changed files with 242 additions and 232 deletions

View File

@@ -152,7 +152,7 @@ void CScriptDebris::AddToRenderer(const zeus::CFrustum& frustum, const CStateMan
static zeus::CVector3f debris_cone(CStateManager& mgr, float coneAng, float minMag, float maxMag)
{
float mag = mgr.GetActiveRandom()->Float() * (maxMag - minMag) + minMag;
float side = 1.f - (1.f - std::cos(zeus::degToRad(coneAng))) * mgr.GetActiveRandom()->Float();
float side = 1.f - (1.f - std::cos(zeus::degToRad(coneAng * 0.5f))) * mgr.GetActiveRandom()->Float();
float hyp = std::max(0.f, 1.f - side * side);
if (hyp != 0.f)
hyp = std::sqrt(hyp);