build 170828. track scanning fix, vbo render path made default

This commit is contained in:
tmj-fstate
2017-08-28 20:23:16 +02:00
parent 3a6e2869ae
commit decbcd8055
3 changed files with 34 additions and 24 deletions

View File

@@ -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 != "")

View File

@@ -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

View File

@@ -1,5 +1,5 @@
#pragma once
#define VERSION_MAJOR 17
#define VERSION_MINOR 825
#define VERSION_MINOR 828
#define VERSION_REVISION 0