@@ -3057,7 +3057,7 @@ void W3DView::setupWaypointPath(Bool orient)
30573057 Real factor2 = curDistance / m_mcwpInfo.totalDistance ;
30583058 Real factor1 = 1.0 -factor2;
30593059 m_mcwpInfo.timeMultiplier [i] = m_timeMultiplier;
3060- m_mcwpInfo.groundHeight [i] = m_pos.z *factor1 + newGround*factor2;
3060+ m_mcwpInfo.waypoints [i]. z = m_pos.z *factor1 + newGround*factor2;
30613061 curDistance += m_mcwpInfo.waySegLength [i];
30623062 // DEBUG_LOG(("New Index %d, angle %.2f", i, m_mcwpInfo.cameraAngle[i]*180/PI));
30633063 }
@@ -3068,9 +3068,8 @@ void W3DView::setupWaypointPath(Bool orient)
30683068 Coord3D prev = m_mcwpInfo.waypoints [m_mcwpInfo.numWaypoints -1 ];
30693069 m_mcwpInfo.waypoints [m_mcwpInfo.numWaypoints +1 ].x += cur.x -prev.x ;
30703070 m_mcwpInfo.waypoints [m_mcwpInfo.numWaypoints +1 ].y += cur.y -prev.y ;
3071+ m_mcwpInfo.waypoints [m_mcwpInfo.numWaypoints +1 ].z = newGround;
30713072 m_mcwpInfo.cameraAngle [m_mcwpInfo.numWaypoints +1 ] = m_mcwpInfo.cameraAngle [m_mcwpInfo.numWaypoints ];
3072- m_mcwpInfo.groundHeight [m_mcwpInfo.numWaypoints +1 ] = newGround;
3073-
30743073
30753074 cur = m_mcwpInfo.waypoints [2 ];
30763075 prev = m_mcwpInfo.waypoints [1 ];
@@ -3293,7 +3292,6 @@ void W3DView::moveAlongWaypointPath(Real milliseconds)
32933292 View::setAngle (m_mcwpInfo.cameraAngle [m_mcwpInfo.numWaypoints ]);
32943293
32953294 Coord3D pos = m_mcwpInfo.waypoints [m_mcwpInfo.numWaypoints ];
3296- pos.z = m_mcwpInfo.groundHeight [m_mcwpInfo.numWaypoints ];
32973295 setPosition (pos);
32983296 // Note - assuming that the scripter knows what he is doing, we adjust the constraints so that
32993297 // the scripted action can occur.
@@ -3396,8 +3394,8 @@ void W3DView::moveAlongWaypointPath(Real milliseconds)
33963394 result.y += factor*(end.y -start.y );
33973395 result.x += (1 -factor)*factor*(mid.x -end.x + mid.x -start.x );
33983396 result.y += (1 -factor)*factor*(mid.y -end.y + mid.y -start.y );
3399- result.z = m_mcwpInfo.groundHeight [m_mcwpInfo.curSegment ]*factor1 +
3400- m_mcwpInfo.groundHeight [m_mcwpInfo.curSegment +1 ]*factor2;
3397+ result.z = m_mcwpInfo.waypoints [m_mcwpInfo.curSegment ]. z *factor1 +
3398+ m_mcwpInfo.waypoints [m_mcwpInfo.curSegment +1 ]. z *factor2;
34013399/*
34023400 DEBUG_LOG(("Dx %.2f, dy %.2f, DeltaANgle = %.2f, %.2f DeltaGround %.2f", m_pos.x-result.x, m_pos.y-result.y, deltaAngle, result.z, result.z-m_pos.z));
34033401*/
0 commit comments