2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 15:47:46 +00:00

Implement water rippling and fix CFluidPlane memory access errors

This commit is contained in:
Jack Andersen
2018-06-03 15:56:21 -10:00
parent 40fdfde691
commit e63102e180
12 changed files with 86 additions and 81 deletions

View File

@@ -1043,8 +1043,10 @@ void CBooRenderer::AddParticleGen(const CParticleGen& gen)
void CBooRenderer::AddPlaneObject(const void* obj, const zeus::CAABox& aabb, const zeus::CPlane& plane, int type)
{
float closeDist = xb0_viewPlane.pointToPlaneDist(aabb.closestPointAlongVector(xb0_viewPlane.normal()));
float farDist = xb0_viewPlane.pointToPlaneDist(aabb.furthestPointAlongVector(xb0_viewPlane.normal()));
zeus::CVector3f closePoint = aabb.closestPointAlongVector(xb0_viewPlane.normal());
zeus::CVector3f farPoint = aabb.furthestPointAlongVector(xb0_viewPlane.normal());
float closeDist = xb0_viewPlane.pointToPlaneDist(closePoint);
float farDist = xb0_viewPlane.pointToPlaneDist(farPoint);
if (closeDist >= 0.f || farDist >= 0.f)
{
bool zOnly = plane.normal().isZero();