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

Numerous uninitialized memory fixes

This commit is contained in:
Jack Andersen
2019-04-06 19:14:48 -10:00
parent b72cc490e8
commit 3a0d2930fa
48 changed files with 112 additions and 79 deletions

View File

@@ -992,7 +992,7 @@ bool CStateManager::GetVisSetForArea(TAreaId a, TAreaId b, CPVSVisSet& setOut) c
TAreaId connArea = dock.GetConnectedAreaId(i);
if (connArea == a) {
const auto& verts = dock.GetPlaneVertices();
zeus::CVector3f dockCenter = (verts[0] + verts[1] + verts[2] + verts[4]) * 0.25f;
zeus::CVector3f dockCenter = (verts[0] + verts[1] + verts[2] + verts[3]) * 0.25f;
if (hasClosestDock)
if ((dockCenter - viewPoint).magSquared() >= (closestDockPoint - viewPoint).magSquared())
continue;