mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 03:47:43 +00:00
Work on CBallCamera
This commit is contained in:
@@ -20,7 +20,33 @@ void CCameraSpline::CalculateKnots(TUniqueId cameraId, const std::vector<SConnec
|
||||
if (lastConn)
|
||||
{
|
||||
TCastToPtr<CScriptCameraWaypoint> waypoint = mgr.ObjectById(mgr.GetIdForScript(lastConn->x8_objId));
|
||||
//if (waypoint)
|
||||
x14_wpTracker.clear();
|
||||
x14_wpTracker.reserve(4);
|
||||
while (waypoint)
|
||||
{
|
||||
auto search = std::find_if(x14_wpTracker.begin(), x14_wpTracker.end(),
|
||||
[&waypoint](const auto& a) { return a == waypoint->GetUniqueId(); });
|
||||
if (search == x14_wpTracker.end())
|
||||
{
|
||||
x14_wpTracker.push_back(waypoint->GetUniqueId());
|
||||
waypoint = mgr.ObjectById(waypoint->GetRandomNextWaypointId(mgr));
|
||||
}
|
||||
}
|
||||
Reset(x14_wpTracker.size());
|
||||
x14_wpTracker.clear();
|
||||
|
||||
waypoint = mgr.ObjectById(mgr.GetIdForScript(lastConn->x8_objId));
|
||||
while (waypoint)
|
||||
{
|
||||
auto search = std::find_if(x14_wpTracker.begin(), x14_wpTracker.end(),
|
||||
[&waypoint](const auto& a) { return a == waypoint->GetUniqueId(); });
|
||||
if (search == x14_wpTracker.end())
|
||||
{
|
||||
x14_wpTracker.push_back(waypoint->GetUniqueId());
|
||||
AddKnot(waypoint->GetTranslation(), waypoint->GetTransform().basis[1]);
|
||||
waypoint = mgr.ObjectById(waypoint->GetRandomNextWaypointId(mgr));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user