mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-18 04:19:19 +02:00
interior lighting power source lookup enhancement, track event activation filtering, switch geometry normal fix, material parsing enhancements, AI acceleration and braking logic tweaks, AI car route scanning accuracy fix, AI braking delay fix
This commit is contained in:
19
Track.cpp
19
Track.cpp
@@ -1409,7 +1409,10 @@ void TTrack::create_geometry( gfx::geometrybank_handle const &Bank ) {
|
||||
case tt_Switch: // dla zwrotnicy dwa razy szyny
|
||||
if( m_material1 || m_material2 ) {
|
||||
// iglice liczone tylko dla zwrotnic
|
||||
gfx::basic_vertex rpts3[24], rpts4[24];
|
||||
gfx::basic_vertex
|
||||
rpts3[24],
|
||||
rpts4[24];
|
||||
glm::vec3 const flipxvalue { -1, 1, 1 };
|
||||
for( int i = 0; i < 12; ++i ) {
|
||||
|
||||
rpts3[ i ] = {
|
||||
@@ -1428,17 +1431,17 @@ void TTrack::create_geometry( gfx::geometrybank_handle const &Bank ) {
|
||||
{ ( -fHTW - iglica[ i ].position.x ) * cos1 + iglica[ i ].position.y * sin1,
|
||||
-( -fHTW - iglica[ i ].position.x ) * sin1 + iglica[ i ].position.y * cos1,
|
||||
0.f},
|
||||
{iglica[ i ].normal},
|
||||
{iglica[ i ].normal * flipxvalue},
|
||||
{iglica[ i ].texture.x, 0.f} };
|
||||
rpts4[ 23 - i ] = {
|
||||
{ ( -fHTW2 - szyna[ i ].position.x ) * cos2 + szyna[ i ].position.y * sin2,
|
||||
-( -fHTW2 - szyna[ i ].position.x ) * sin2 + iglica[ i ].position.y * cos2,
|
||||
0.f},
|
||||
{szyna[ i ].normal},
|
||||
{szyna[ i ].normal * flipxvalue},
|
||||
{szyna[ i ].texture.x, 0.f} };
|
||||
}
|
||||
// TODO, TBD: change all track geometry to triangles, to allow packing data in less, larger buffers
|
||||
auto const bladelength { 2 * Global.SplineFidelity };
|
||||
auto const bladelength { static_cast<int>( std::ceil( SwitchExtension->Segments[ 0 ]->RaSegCount() * 0.65 ) ) };
|
||||
if (SwitchExtension->RightSwitch)
|
||||
{ // nowa wersja z SPKS, ale odwrotnie lewa/prawa
|
||||
gfx::vertex_array vertices;
|
||||
@@ -2464,6 +2467,7 @@ TTrack * TTrack::RaAnimate()
|
||||
gfx::basic_vertex
|
||||
rpts3[ 24 ],
|
||||
rpts4[ 24 ];
|
||||
glm::vec3 const flipxvalue { -1, 1, 1 };
|
||||
for (int i = 0; i < 12; ++i) {
|
||||
|
||||
rpts3[ i ] = {
|
||||
@@ -2482,19 +2486,18 @@ TTrack * TTrack::RaAnimate()
|
||||
{+( -fHTW - iglica[ i ].position.x ) * cos1 + iglica[ i ].position.y * sin1,
|
||||
-( -fHTW - iglica[ i ].position.x ) * sin1 + iglica[ i ].position.y * cos1,
|
||||
0.f},
|
||||
{iglica[ i ].normal},
|
||||
{iglica[ i ].normal * flipxvalue},
|
||||
{iglica[ i ].texture.x, 0.f} };
|
||||
rpts4[ 23 - i ] = {
|
||||
{ ( -fHTW2 - szyna[ i ].position.x ) * cos2 + szyna[ i ].position.y * sin2,
|
||||
-( -fHTW2 - szyna[ i ].position.x ) * sin2 + iglica[ i ].position.y * cos2,
|
||||
0.f},
|
||||
{szyna[ i ].normal},
|
||||
{szyna[ i ].normal * flipxvalue},
|
||||
{szyna[ i ].texture.x, 0.f} };
|
||||
}
|
||||
|
||||
gfx::vertex_array vertices;
|
||||
|
||||
auto const bladelength { 2 * Global.SplineFidelity };
|
||||
auto const bladelength { static_cast<int>( std::ceil( SwitchExtension->Segments[ 0 ]->RaSegCount() * 0.65 ) ) };
|
||||
if (SwitchExtension->RightSwitch)
|
||||
{ // nowa wersja z SPKS, ale odwrotnie lewa/prawa
|
||||
if( m_material1 ) {
|
||||
|
||||
Reference in New Issue
Block a user