Skip to content

Commit

Permalink
Added 9v cross.
Browse files Browse the repository at this point in the history
  • Loading branch information
leozide committed Nov 27, 2024
1 parent a08ad3f commit 0732221
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions common/lc_traintrack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
#include "lc_application.h"

// todo:
// add cross 32087.dat and auto replace when going over a straight section
// detect existing connections
// new gizmo mesh
// auto replace cross when going over a straight section
// redo gizmo
// add cross to gizmo
// rotate around connections
// shortcuts for changing active connection
// move config to json
// add other track types

Expand Down Expand Up @@ -67,6 +69,20 @@ void lcTrainTrackInit(lcPiecesLibrary* Library)
TrainTrackInfo->AddConnection({lcMatrix44(lcMatrix33RotationZ(-22.5f * LC_DTOR), lcVector3(BranchX, -BranchY, 0.0f))});
TrainTrackInfo->AddConnection({lcMatrix44(lcMatrix33RotationZ(LC_PI), lcVector3(-320.0f, 0.0f, 0.0f))});

Info->SetTrainTrackInfo(TrainTrackInfo);
}

Info = Library->FindPiece("32087.dat", nullptr, false, false);

if (Info)
{
lcTrainTrackInfo* TrainTrackInfo = new lcTrainTrackInfo();

TrainTrackInfo->AddConnection({lcMatrix44Translation(lcVector3(160.0f, 0.0f, 0.0f))});
TrainTrackInfo->AddConnection({lcMatrix44(lcMatrix33RotationZ(LC_PI / 2.0f), lcVector3(0.0f, 160.0f, 0.0f))});
TrainTrackInfo->AddConnection({lcMatrix44(lcMatrix33RotationZ(LC_PI), lcVector3(-160.0f, 0.0f, 0.0f))});
TrainTrackInfo->AddConnection({lcMatrix44(lcMatrix33RotationZ(-LC_PI / 2.0f), lcVector3(0.0f, -160.0f, 0.0f))});

Info->SetTrainTrackInfo(TrainTrackInfo);
}
}
Expand Down

0 comments on commit 0732221

Please sign in to comment.