mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 17:29:18 +02:00
build 170828. track scanning fix, vbo render path made default
This commit is contained in:
54
Driver.cpp
54
Driver.cpp
@@ -3583,36 +3583,46 @@ bool TController::UpdateSituation(double dt)
|
|||||||
pVehicles[ 0 ] == pVehicles[ 1 ] ?
|
pVehicles[ 0 ] == pVehicles[ 1 ] ?
|
||||||
pVehicles[ 0 ] :
|
pVehicles[ 0 ] :
|
||||||
pVehicles[ 1 ] );
|
pVehicles[ 1 ] );
|
||||||
if( iDirection > 0 ) {
|
if( mvOccupied->V >= 0.0 ) {
|
||||||
// towards coupler 0
|
// towards coupler 0
|
||||||
if( ( rearvehicle->NextConnected != nullptr )
|
if( ( mvOccupied->V * iDirection < 0.0 )
|
||||||
&& ( rearvehicle->MoverParameters->Couplers[ ( rearvehicle->DirectionGet() > 0 ? 1 : 0 ) ].CouplingFlag == ctrain_virtual ) ) {
|
|| ( ( rearvehicle->NextConnected != nullptr )
|
||||||
// scan behind if we had something connected there and are moving away
|
&& ( rearvehicle->MoverParameters->Couplers[ ( rearvehicle->DirectionGet() > 0 ? 1 : 0 ) ].CouplingFlag == ctrain_virtual ) ) ) {
|
||||||
rearvehicle->ABuScanObjects( -1, fMaxProximityDist );
|
// scan behind if we're moving backward, or if we had something connected there and are moving away
|
||||||
|
rearvehicle->ABuScanObjects( (
|
||||||
|
pVehicle->DirectionGet() == rearvehicle->DirectionGet() ?
|
||||||
|
-1 :
|
||||||
|
1 ),
|
||||||
|
fMaxProximityDist );
|
||||||
}
|
}
|
||||||
pVehicles[ 0 ]->ABuScanObjects( 1, scandistance );
|
pVehicles[ 0 ]->ABuScanObjects( (
|
||||||
|
pVehicle->DirectionGet() == pVehicles[ 0 ]->DirectionGet() ?
|
||||||
|
1 :
|
||||||
|
-1 ),
|
||||||
|
scandistance );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// towards coupler 1
|
// towards coupler 1
|
||||||
if( ( rearvehicle->PrevConnected != nullptr )
|
if( ( mvOccupied->V * iDirection < 0.0 )
|
||||||
&& ( rearvehicle->MoverParameters->Couplers[ ( rearvehicle->DirectionGet() > 0 ? 0 : 1 ) ].CouplingFlag == ctrain_virtual ) ) {
|
|| ( ( rearvehicle->PrevConnected != nullptr )
|
||||||
// scan behind if we had something connected there and are moving away
|
&& ( rearvehicle->MoverParameters->Couplers[ ( rearvehicle->DirectionGet() > 0 ? 0 : 1 ) ].CouplingFlag == ctrain_virtual ) ) ) {
|
||||||
rearvehicle->ABuScanObjects( 1, fMaxProximityDist );
|
// scan behind if we're moving backward, or if we had something connected there and are moving away
|
||||||
|
rearvehicle->ABuScanObjects( (
|
||||||
|
pVehicle->DirectionGet() == rearvehicle->DirectionGet() ?
|
||||||
|
1 :
|
||||||
|
-1 ),
|
||||||
|
fMaxProximityDist );
|
||||||
}
|
}
|
||||||
pVehicles[ 0 ]->ABuScanObjects( -1, scandistance );
|
pVehicles[ 0 ]->ABuScanObjects( (
|
||||||
|
pVehicle->DirectionGet() == pVehicles[ 0 ]->DirectionGet() ?
|
||||||
|
-1 :
|
||||||
|
1 ),
|
||||||
|
scandistance );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
pVehicles[ 0 ]->fScanDist = (
|
|
||||||
mvOccupied->Vel > 5.0 ?
|
|
||||||
400 + fBrakeDist :
|
|
||||||
300.0 );
|
|
||||||
pVehicles[ 0 ]->Update_scan();
|
|
||||||
if( pVehicles[ 1 ] != pVehicles[ 0 ] ) {
|
|
||||||
pVehicles[ 1 ]->fScanDist = pVehicles[ 0 ]->fScanDist;
|
|
||||||
pVehicles[ 1 ]->Update_scan();
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
if (AIControllFlag)
|
if (AIControllFlag)
|
||||||
{ // tu bedzie logika sterowania
|
{ // tu bedzie logika sterowania
|
||||||
if (mvOccupied->CommandIn.Command != "")
|
if (mvOccupied->CommandIn.Command != "")
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ int Global::iDefaultFiltering = 9; // domyślne rozmywanie tekstur TGA bez alfa
|
|||||||
int Global::iBallastFiltering = 9; // domyślne rozmywanie tekstur podsypki
|
int Global::iBallastFiltering = 9; // domyślne rozmywanie tekstur podsypki
|
||||||
int Global::iRailProFiltering = 5; // domyślne rozmywanie tekstur szyn
|
int Global::iRailProFiltering = 5; // domyślne rozmywanie tekstur szyn
|
||||||
int Global::iDynamicFiltering = 5; // domyślne rozmywanie tekstur pojazdów
|
int Global::iDynamicFiltering = 5; // domyślne rozmywanie tekstur pojazdów
|
||||||
bool Global::bUseVBO = false; // czy jest VBO w karcie graficznej (czy użyć)
|
bool Global::bUseVBO = true; // czy jest VBO w karcie graficznej (czy użyć)
|
||||||
std::string Global::LastGLError;
|
std::string Global::LastGLError;
|
||||||
GLint Global::iMaxTextureSize = 4096; // maksymalny rozmiar tekstury
|
GLint Global::iMaxTextureSize = 4096; // maksymalny rozmiar tekstury
|
||||||
bool Global::bSmoothTraction = false; // wygładzanie drutów starym sposobem
|
bool Global::bSmoothTraction = false; // wygładzanie drutów starym sposobem
|
||||||
|
|||||||
Reference in New Issue
Block a user