mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01: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 ] );
|
||||
if( iDirection > 0 ) {
|
||||
if( mvOccupied->V >= 0.0 ) {
|
||||
// towards coupler 0
|
||||
if( ( rearvehicle->NextConnected != nullptr )
|
||||
&& ( rearvehicle->MoverParameters->Couplers[ ( rearvehicle->DirectionGet() > 0 ? 1 : 0 ) ].CouplingFlag == ctrain_virtual ) ) {
|
||||
// scan behind if we had something connected there and are moving away
|
||||
rearvehicle->ABuScanObjects( -1, fMaxProximityDist );
|
||||
if( ( mvOccupied->V * iDirection < 0.0 )
|
||||
|| ( ( rearvehicle->NextConnected != nullptr )
|
||||
&& ( rearvehicle->MoverParameters->Couplers[ ( rearvehicle->DirectionGet() > 0 ? 1 : 0 ) ].CouplingFlag == ctrain_virtual ) ) ) {
|
||||
// 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 {
|
||||
// towards coupler 1
|
||||
if( ( rearvehicle->PrevConnected != nullptr )
|
||||
&& ( rearvehicle->MoverParameters->Couplers[ ( rearvehicle->DirectionGet() > 0 ? 0 : 1 ) ].CouplingFlag == ctrain_virtual ) ) {
|
||||
// scan behind if we had something connected there and are moving away
|
||||
rearvehicle->ABuScanObjects( 1, fMaxProximityDist );
|
||||
if( ( mvOccupied->V * iDirection < 0.0 )
|
||||
|| ( ( rearvehicle->PrevConnected != nullptr )
|
||||
&& ( rearvehicle->MoverParameters->Couplers[ ( rearvehicle->DirectionGet() > 0 ? 0 : 1 ) ].CouplingFlag == ctrain_virtual ) ) ) {
|
||||
// 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)
|
||||
{ // tu bedzie logika sterowania
|
||||
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::iRailProFiltering = 5; // domyślne rozmywanie tekstur szyn
|
||||
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;
|
||||
GLint Global::iMaxTextureSize = 4096; // maksymalny rozmiar tekstury
|
||||
bool Global::bSmoothTraction = false; // wygładzanie drutów starym sposobem
|
||||
|
||||
Reference in New Issue
Block a user