From 197fa21f989ff70a9d58cf2d5b6697cf2a336e35 Mon Sep 17 00:00:00 2001 From: tmj-fstate Date: Fri, 17 Feb 2017 22:47:21 +0100 Subject: [PATCH] point light size increase, changed movement scheme control in the cab --- Driver.cpp | 4 + DynObj.cpp | 28 ++---- Model3d.cpp | 2 +- Train.cpp | 282 ++++++++++++++++++++++++++-------------------------- World.cpp | 6 +- 5 files changed, 157 insertions(+), 165 deletions(-) diff --git a/Driver.cpp b/Driver.cpp index 57ec94a6..bd5bede7 100644 --- a/Driver.cpp +++ b/Driver.cpp @@ -1171,6 +1171,10 @@ TCommandType TController::TableUpdate(double &fVelDes, double &fDist, double &fN iDrivigFlags |= moveSemaphorFound; //jeśli z przodu to dajemy falgę, że jest d_to_next_sem = Min0R(sSpeedTable[i].fDist, d_to_next_sem); } + if( sSpeedTable[ i ].fDist <= d_to_next_sem ) + { + VelSignalNext = sSpeedTable[ i ].fVelNext; + } } else if (sSpeedTable[i].iFlags & spRoadVel) { // to W6 diff --git a/DynObj.cpp b/DynObj.cpp index 9dba3343..0bdfc85b 100644 --- a/DynObj.cpp +++ b/DynObj.cpp @@ -3100,7 +3100,11 @@ bool TDynamicObject::Update(double dt, double dt1) dDOMoveLen = GetdMoveLen() + MoverParameters->ComputeMovement(dt, dt1, ts, tp, tmpTraction, l, r); // yB: zeby zawsze wrzucalo w jedna strone zakretu +/* + // this seemed to have opposite effect, if anything -- the sway direction would be affected + // by the 'direction' of the track, making the sway go sometimes inward, sometimes outward MoverParameters->AccN *= -ABuGetDirection(); +*/ // if (dDOMoveLen!=0.0) //Ra: nie może być, bo blokuje Event0 Move(dDOMoveLen); if (!bEnabled) // usuwane pojazdy nie mają toru @@ -3530,24 +3534,24 @@ bool TDynamicObject::Update(double dt, double dt1) // NBMX Obsluga drzwi, MC: zuniwersalnione if ((dDoorMoveL < MoverParameters->DoorMaxShiftL) && (MoverParameters->DoorLeftOpened)) { - rsDoorOpen.Play(vol, 0, MechInside, vPosition); + rsDoorOpen.Play(1, 0, MechInside, vPosition); dDoorMoveL += dt1 * 0.5 * MoverParameters->DoorOpenSpeed; } if ((dDoorMoveL > 0) && (!MoverParameters->DoorLeftOpened)) { - rsDoorClose.Play(vol, 0, MechInside, vPosition); + rsDoorClose.Play(1, 0, MechInside, vPosition); dDoorMoveL -= dt1 * MoverParameters->DoorCloseSpeed; if (dDoorMoveL < 0) dDoorMoveL = 0; } if ((dDoorMoveR < MoverParameters->DoorMaxShiftR) && (MoverParameters->DoorRightOpened)) { - rsDoorOpen.Play(vol, 0, MechInside, vPosition); + rsDoorOpen.Play(1, 0, MechInside, vPosition); dDoorMoveR += dt1 * 0.5 * MoverParameters->DoorOpenSpeed; } if ((dDoorMoveR > 0) && (!MoverParameters->DoorRightOpened)) { - rsDoorClose.Play(vol, 0, MechInside, vPosition); + rsDoorClose.Play(1, 0, MechInside, vPosition); dDoorMoveR -= dt1 * MoverParameters->DoorCloseSpeed; if (dDoorMoveR < 0) dDoorMoveR = 0; @@ -5357,10 +5361,6 @@ void TDynamicObject::LoadMMediaFile(std::string BaseDir, std::string TypeName, token, 50, GetPosition().x, GetPosition().y, GetPosition().z, true ); - sPantUp.AM = 50000; - sPantUp.AA = -1 * ( 105 - Random( 10 ) ) / 100; - sPantUp.FM = 1.0; - sPantUp.FA = 0.0; } else if( token == "pantographdown:" ) { @@ -5370,10 +5370,6 @@ void TDynamicObject::LoadMMediaFile(std::string BaseDir, std::string TypeName, token, 50, GetPosition().x, GetPosition().y, GetPosition().z, true ); - sPantDown.AM = 50000; - sPantDown.AA = -1 * ( 105 - Random( 10 ) ) / 100; - sPantDown.FM = 1.0; - sPantDown.FA = 0.0; } else if( token == "compressor:" ) { @@ -5404,10 +5400,6 @@ void TDynamicObject::LoadMMediaFile(std::string BaseDir, std::string TypeName, token, 50, GetPosition().x, GetPosition().y, GetPosition().z, true ); - rsDoorOpen.AM = 50000; - rsDoorOpen.AA = -1 * ( 105 - Random( 10 ) ) / 100; - rsDoorOpen.FM = 1.0; - rsDoorOpen.FA = 0.0; } else if( token == "doorclose:" ) { @@ -5417,10 +5409,6 @@ void TDynamicObject::LoadMMediaFile(std::string BaseDir, std::string TypeName, token, 50, GetPosition().x, GetPosition().y, GetPosition().z, true ); - rsDoorClose.AM = 50000; - rsDoorClose.AA = -1 * ( 105 - Random( 10 ) ) / 100; - rsDoorClose.FM = 1.0; - rsDoorClose.FA = 0.0; } else if( token == "sand:" ) { diff --git a/Model3d.cpp b/Model3d.cpp index 4071db89..fec5b563 100644 --- a/Model3d.cpp +++ b/Model3d.cpp @@ -726,7 +726,7 @@ void TSubModel::DisplayLists() glColorMaterial(GL_FRONT, GL_EMISSION); glDisable(GL_LIGHTING); // Tolaris-030603: bo mu punkty swiecace sie blendowaly glBegin(GL_POINTS); - glVertex3f(0, 0, 0); + glVertex3f( 0.0f, 0.0f, -0.025f ); // shift point towards the viewer, to avoid z-fighting with the light polygons glEnd(); glEnable(GL_LIGHTING); glColorMaterial(GL_FRONT, GL_AMBIENT_AND_DIFFUSE); diff --git a/Train.cpp b/Train.cpp index e557dcbe..66599599 100644 --- a/Train.cpp +++ b/Train.cpp @@ -24,6 +24,7 @@ http://mozilla.org/MPL/2.0/. #include "Console.h" #include "McZapkie\hamulce.h" #include "McZapkie\MOVER.h" +#include "Camera.h" //--------------------------------------------------------------------------- using namespace Timer; @@ -891,56 +892,56 @@ if ((mvControlled->PantFrontVolt) || (mvControlled->PantRearVolt) || if (false == (mvOccupied->LightsPosNo > 0)) { if ((GetAsyncKeyState(VK_CONTROL) < 0) && - (ggRearLeftLightButton.SubModel)) // hunter-230112 - z controlem zapala z tylu + (ggRearRightLightButton.SubModel)) // hunter-230112 - z controlem zapala z tylu. + // 17.02.17 changed rear to opposite side, so the same key actually controls both lights on the left side, from the driver's point of view + // TODO: do it a more elegant way. preferably along with the rest of the controlling code { - //------------------------------ if (mvOccupied->ActiveCab == 1) { // kabina 1 - if (((DynamicObject->iLights[1]) & 3) == 0) + if (((DynamicObject->iLights[1]) & 48) == 0) { - DynamicObject->iLights[1] |= 1; + DynamicObject->iLights[1] |= 16; dsbSwitch->SetVolume(DSBVOLUME_MAX); dsbSwitch->Play(0, 0, 0); - ggRearLeftLightButton.PutValue(1); + ggRearRightLightButton.PutValue(1); } - if (((DynamicObject->iLights[1]) & 3) == 2) + if (((DynamicObject->iLights[1]) & 48) == 32) { - DynamicObject->iLights[1] &= (255 - 2); + DynamicObject->iLights[1] &= (255 - 32); dsbSwitch->SetVolume(DSBVOLUME_MAX); dsbSwitch->Play(0, 0, 0); - if (ggRearLeftEndLightButton.SubModel) + if (ggRearRightEndLightButton.SubModel) { - ggRearLeftEndLightButton.PutValue(0); - ggRearLeftLightButton.PutValue(0); + ggRearRightEndLightButton.PutValue(0); + ggRearRightLightButton.PutValue(0); } else - ggRearLeftLightButton.PutValue(0); + ggRearRightLightButton.PutValue(0); } } else { // kabina -1 - if (((DynamicObject->iLights[0]) & 3) == 0) + if (((DynamicObject->iLights[0]) & 48) == 0) { - DynamicObject->iLights[0] |= 1; + DynamicObject->iLights[0] |= 16; dsbSwitch->SetVolume(DSBVOLUME_MAX); dsbSwitch->Play(0, 0, 0); - ggRearLeftLightButton.PutValue(1); + ggRearRightLightButton.PutValue(1); } - if (((DynamicObject->iLights[0]) & 3) == 2) + if (((DynamicObject->iLights[0]) & 48) == 32) { - DynamicObject->iLights[0] &= (255 - 2); + DynamicObject->iLights[0] &= (255 - 32); dsbSwitch->SetVolume(DSBVOLUME_MAX); dsbSwitch->Play(0, 0, 0); - if (ggRearLeftEndLightButton.SubModel) + if (ggRearRightEndLightButton.SubModel) { - ggRearLeftEndLightButton.PutValue(0); - ggRearLeftLightButton.PutValue(0); + ggRearRightEndLightButton.PutValue(0); + ggRearRightLightButton.PutValue(0); } else - ggRearLeftLightButton.PutValue(0); + ggRearRightLightButton.PutValue(0); } } - //---------------------- } else { @@ -1066,53 +1067,46 @@ if ((mvControlled->PantFrontVolt) || (mvControlled->PantRearVolt) || if (false == (mvOccupied->LightsPosNo > 0)) { if ((GetAsyncKeyState(VK_CONTROL) < 0) && - (ggRearRightLightButton.SubModel)) // hunter-230112 - z controlem zapala z tylu + (ggRearLeftLightButton.SubModel)) // hunter-230112 - z controlem zapala z tylu + // 17.02.17 changed rear to opposite side, so the same key actually controls both lights on the left side, from the driver's point of view + // TODO: do it a more elegant way. preferably along with the rest of the controlling code { - //------------------------------ - if (mvOccupied->ActiveCab == 1) - { // kabina 1 - if (((DynamicObject->iLights[1]) & 48) == 0) - { - DynamicObject->iLights[1] |= 16; - dsbSwitch->SetVolume(DSBVOLUME_MAX); - dsbSwitch->Play(0, 0, 0); - ggRearRightLightButton.PutValue(1); + if( mvOccupied->ActiveCab == 1 ) { // kabina 1 + if( ( ( DynamicObject->iLights[ 1 ] ) & 3 ) == 0 ) { + DynamicObject->iLights[ 1 ] |= 1; + dsbSwitch->SetVolume( DSBVOLUME_MAX ); + dsbSwitch->Play( 0, 0, 0 ); + ggRearLeftLightButton.PutValue( 1 ); } - if (((DynamicObject->iLights[1]) & 48) == 32) - { - DynamicObject->iLights[1] &= (255 - 32); - dsbSwitch->SetVolume(DSBVOLUME_MAX); - dsbSwitch->Play(0, 0, 0); - if (ggRearRightEndLightButton.SubModel) - { - ggRearRightEndLightButton.PutValue(0); - ggRearRightLightButton.PutValue(0); + if( ( ( DynamicObject->iLights[ 1 ] ) & 3 ) == 2 ) { + DynamicObject->iLights[ 1 ] &= ( 255 - 2 ); + dsbSwitch->SetVolume( DSBVOLUME_MAX ); + dsbSwitch->Play( 0, 0, 0 ); + if( ggRearLeftEndLightButton.SubModel ) { + ggRearLeftEndLightButton.PutValue( 0 ); + ggRearLeftLightButton.PutValue( 0 ); } else - ggRearRightLightButton.PutValue(0); + ggRearLeftLightButton.PutValue( 0 ); } } - else - { // kabina -1 - if (((DynamicObject->iLights[0]) & 48) == 0) - { - DynamicObject->iLights[0] |= 16; - dsbSwitch->SetVolume(DSBVOLUME_MAX); - dsbSwitch->Play(0, 0, 0); - ggRearRightLightButton.PutValue(1); + else { // kabina -1 + if( ( ( DynamicObject->iLights[ 0 ] ) & 3 ) == 0 ) { + DynamicObject->iLights[ 0 ] |= 1; + dsbSwitch->SetVolume( DSBVOLUME_MAX ); + dsbSwitch->Play( 0, 0, 0 ); + ggRearLeftLightButton.PutValue( 1 ); } - if (((DynamicObject->iLights[0]) & 48) == 32) - { - DynamicObject->iLights[0] &= (255 - 32); - dsbSwitch->SetVolume(DSBVOLUME_MAX); - dsbSwitch->Play(0, 0, 0); - if (ggRearRightEndLightButton.SubModel) - { - ggRearRightEndLightButton.PutValue(0); - ggRearRightLightButton.PutValue(0); + if( ( ( DynamicObject->iLights[ 0 ] ) & 3 ) == 2 ) { + DynamicObject->iLights[ 0 ] &= ( 255 - 2 ); + dsbSwitch->SetVolume( DSBVOLUME_MAX ); + dsbSwitch->Play( 0, 0, 0 ); + if( ggRearLeftEndLightButton.SubModel ) { + ggRearLeftEndLightButton.PutValue( 0 ); + ggRearLeftLightButton.PutValue( 0 ); } else - ggRearRightLightButton.PutValue(0); + ggRearLeftLightButton.PutValue( 0 ); } } } //------------------------------ @@ -2099,52 +2093,46 @@ if { if ((GetAsyncKeyState(VK_CONTROL) < 0) && (ggRearLeftLightButton.SubModel)) // hunter-230112 - z controlem gasi z tylu + // 17.02.17 changed rear to opposite side, so the same key actually controls both lights on the left side, from the driver's point of view + // TODO: do it a more elegant way. preferably along with the rest of the controlling code { //------------------------------ - if (mvOccupied->ActiveCab == 1) - { // kabina 1 - if (((DynamicObject->iLights[1]) & 3) == 0) - { - DynamicObject->iLights[1] |= 2; - dsbSwitch->SetVolume(DSBVOLUME_MAX); - dsbSwitch->Play(0, 0, 0); - if (ggRearLeftEndLightButton.SubModel) - { - ggRearLeftEndLightButton.PutValue(1); - ggRearLeftLightButton.PutValue(0); + if( mvOccupied->ActiveCab == 1 ) { // kabina 1 (od strony 0) + if( ( ( DynamicObject->iLights[ 1 ] ) & 48 ) == 0 ) { + DynamicObject->iLights[ 1 ] |= 32; + dsbSwitch->SetVolume( DSBVOLUME_MAX ); + dsbSwitch->Play( 0, 0, 0 ); + if( ggRearRightEndLightButton.SubModel ) { + ggRearRightEndLightButton.PutValue( 1 ); + ggRearRightLightButton.PutValue( 0 ); } else - ggRearLeftLightButton.PutValue(-1); + ggRearRightLightButton.PutValue( -1 ); } - if (((DynamicObject->iLights[1]) & 3) == 1) - { - DynamicObject->iLights[1] &= (255 - 1); - dsbSwitch->SetVolume(DSBVOLUME_MAX); - dsbSwitch->Play(0, 0, 0); - ggRearLeftLightButton.PutValue(0); + if( ( ( DynamicObject->iLights[ 1 ] ) & 48 ) == 16 ) { + DynamicObject->iLights[ 1 ] &= ( 255 - 16 ); + dsbSwitch->SetVolume( DSBVOLUME_MAX ); + dsbSwitch->Play( 0, 0, 0 ); + ggRearRightLightButton.PutValue( 0 ); } } - else - { // kabina -1 - if (((DynamicObject->iLights[0]) & 3) == 0) - { - DynamicObject->iLights[0] |= 2; - dsbSwitch->SetVolume(DSBVOLUME_MAX); - dsbSwitch->Play(0, 0, 0); - if (ggRearLeftEndLightButton.SubModel) - { - ggRearLeftEndLightButton.PutValue(1); - ggRearLeftLightButton.PutValue(0); + else { // kabina -1 + if( ( ( DynamicObject->iLights[ 0 ] ) & 48 ) == 0 ) { + DynamicObject->iLights[ 0 ] |= 32; + dsbSwitch->SetVolume( DSBVOLUME_MAX ); + dsbSwitch->Play( 0, 0, 0 ); + if( ggRearRightEndLightButton.SubModel ) { + ggRearRightEndLightButton.PutValue( 1 ); + ggRearRightLightButton.PutValue( 0 ); } else - ggRearLeftLightButton.PutValue(-1); + ggRearRightLightButton.PutValue( -1 ); } - if (((DynamicObject->iLights[1]) & 3) == 1) - { - DynamicObject->iLights[1] &= (255 - 1); - dsbSwitch->SetVolume(DSBVOLUME_MAX); - dsbSwitch->Play(0, 0, 0); - ggLeftLightButton.PutValue(0); + if( ( ( DynamicObject->iLights[ 0 ] ) & 48 ) == 16 ) { + DynamicObject->iLights[ 0 ] &= ( 255 - 16 ); + dsbSwitch->SetVolume( DSBVOLUME_MAX ); + dsbSwitch->Play( 0, 0, 0 ); + ggRearRightLightButton.PutValue( 0 ); } } } //------------------------------ @@ -2272,52 +2260,46 @@ if { if ((GetAsyncKeyState(VK_CONTROL) < 0) && (ggRearRightLightButton.SubModel)) // hunter-230112 - z controlem gasi z tylu + // 17.02.17 changed rear to opposite side, so the same key actually controls both lights on the left side, from the driver's point of view + // TODO: do it a more elegant way. preferably along with the rest of the controlling code { //------------------------------ - if (mvOccupied->ActiveCab == 1) - { // kabina 1 (od strony 0) - if (((DynamicObject->iLights[1]) & 48) == 0) - { - DynamicObject->iLights[1] |= 32; - dsbSwitch->SetVolume(DSBVOLUME_MAX); - dsbSwitch->Play(0, 0, 0); - if (ggRearRightEndLightButton.SubModel) - { - ggRearRightEndLightButton.PutValue(1); - ggRearRightLightButton.PutValue(0); + if( mvOccupied->ActiveCab == 1 ) { // kabina 1 + if( ( ( DynamicObject->iLights[ 1 ] ) & 3 ) == 0 ) { + DynamicObject->iLights[ 1 ] |= 2; + dsbSwitch->SetVolume( DSBVOLUME_MAX ); + dsbSwitch->Play( 0, 0, 0 ); + if( ggRearLeftEndLightButton.SubModel ) { + ggRearLeftEndLightButton.PutValue( 1 ); + ggRearLeftLightButton.PutValue( 0 ); } else - ggRearRightLightButton.PutValue(-1); + ggRearLeftLightButton.PutValue( -1 ); } - if (((DynamicObject->iLights[1]) & 48) == 16) - { - DynamicObject->iLights[1] &= (255 - 16); - dsbSwitch->SetVolume(DSBVOLUME_MAX); - dsbSwitch->Play(0, 0, 0); - ggRearRightLightButton.PutValue(0); + if( ( ( DynamicObject->iLights[ 1 ] ) & 3 ) == 1 ) { + DynamicObject->iLights[ 1 ] &= ( 255 - 1 ); + dsbSwitch->SetVolume( DSBVOLUME_MAX ); + dsbSwitch->Play( 0, 0, 0 ); + ggRearLeftLightButton.PutValue( 0 ); } } - else - { // kabina -1 - if (((DynamicObject->iLights[0]) & 48) == 0) - { - DynamicObject->iLights[0] |= 32; - dsbSwitch->SetVolume(DSBVOLUME_MAX); - dsbSwitch->Play(0, 0, 0); - if (ggRearRightEndLightButton.SubModel) - { - ggRearRightEndLightButton.PutValue(1); - ggRearRightLightButton.PutValue(0); + else { // kabina -1 + if( ( ( DynamicObject->iLights[ 0 ] ) & 3 ) == 0 ) { + DynamicObject->iLights[ 0 ] |= 2; + dsbSwitch->SetVolume( DSBVOLUME_MAX ); + dsbSwitch->Play( 0, 0, 0 ); + if( ggRearLeftEndLightButton.SubModel ) { + ggRearLeftEndLightButton.PutValue( 1 ); + ggRearLeftLightButton.PutValue( 0 ); } else - ggRearRightLightButton.PutValue(-1); + ggRearLeftLightButton.PutValue( -1 ); } - if (((DynamicObject->iLights[0]) & 48) == 16) - { - DynamicObject->iLights[0] &= (255 - 16); - dsbSwitch->SetVolume(DSBVOLUME_MAX); - dsbSwitch->Play(0, 0, 0); - ggRearRightLightButton.PutValue(0); + if( ( ( DynamicObject->iLights[ 1 ] ) & 3 ) == 1 ) { + DynamicObject->iLights[ 1 ] &= ( 255 - 1 ); + dsbSwitch->SetVolume( DSBVOLUME_MAX ); + dsbSwitch->Play( 0, 0, 0 ); + ggLeftLightButton.PutValue( 0 ); } } } //------------------------------ @@ -2402,17 +2384,25 @@ if { // McZapkie: poruszanie sie po kabinie, w updatemechpos zawarte sa wiezy - // double dt=Timer::GetDeltaTime(); - if (mvOccupied->ActiveCab < 0) - fMechCroach = -0.5; - else - fMechCroach = 0.5; + auto step = 60.0f * Timer::GetDeltaTime(); + auto const camerayaw = Global::pCamera->Yaw; + Math3D::vector3 direction( 0.0f, 0.0f, step ); + direction.RotateY( camerayaw ); + Math3D::vector3 right( -step, 0.0f, 0.0f ); + right.RotateY( camerayaw ); + // auto right = Math3D::CrossProduct( direction, Math3D::vector3( 0.0f, 1.0f, 0.0f ) ); + + if( mvOccupied->ActiveCab < 0 ) { + + direction *= -1.0f; + right *= -1.0f; + } // if (!GetAsyncKeyState(VK_SHIFT)<0) // bez shifta if (!Console::Pressed(VK_CONTROL)) // gdy [Ctrl] zwolniony (dodatkowe widoki) { if (cKey == Global::Keys[k_MechLeft]) { - vMechMovement.x += fMechCroach; + vMechMovement -= right; if (DynamicObject->Mechanik) if (!FreeFlyModeFlag) //żeby nie mieszać obserwując z zewnątrz DynamicObject->Mechanik->RouteSwitch( @@ -2420,7 +2410,7 @@ if } else if (cKey == Global::Keys[k_MechRight]) { - vMechMovement.x -= fMechCroach; + vMechMovement += right; if (DynamicObject->Mechanik) if (!FreeFlyModeFlag) //żeby nie mieszać obserwując z zewnątrz DynamicObject->Mechanik->RouteSwitch( @@ -2428,7 +2418,7 @@ if } else if (cKey == Global::Keys[k_MechBackward]) { - vMechMovement.z -= fMechCroach; + vMechMovement -= direction; // if (DynamicObject->Mechanik) // if (!FreeFlyModeFlag) //żeby nie mieszać obserwując z zewnątrz // DynamicObject->Mechanik->RouteSwitch(0); //na skrzyżowaniu stanie @@ -2436,16 +2426,16 @@ if } else if (cKey == Global::Keys[k_MechForward]) { - vMechMovement.z += fMechCroach; + vMechMovement += direction; if (DynamicObject->Mechanik) if (!FreeFlyModeFlag) //żeby nie mieszać obserwując z zewnątrz DynamicObject->Mechanik->RouteSwitch( 3); // na skrzyżowaniu pojedzie prosto } else if (cKey == Global::Keys[k_MechUp]) - pMechOffset.y += 0.2; // McZapkie-120302 - wstawanie + pMechOffset.y += 0.25; // McZapkie-120302 - wstawanie else if (cKey == Global::Keys[k_MechDown]) - pMechOffset.y -= 0.2; // McZapkie-120302 - siadanie + pMechOffset.y -= 0.25; // McZapkie-120302 - siadanie } } @@ -5994,6 +5984,10 @@ bool TTrain::initialize_button(cParser &Parser, std::string const &Label, int co { btLampkaHamienie.Load(Parser, DynamicObject->mdKabina); } + else if( Label == "i-dynamicbrake:" ) { + + btLampkaED.Load( Parser, DynamicObject->mdKabina ); + } else if (Label == "i-braking-ezt:") { btLampkaHamowanie1zes.Load(Parser, DynamicObject->mdKabina); @@ -6334,6 +6328,10 @@ bool TTrain::initialize_gauge(cParser &Parser, std::string const &Label, int con // hunter-091012: przyciemnienie swiatla w kabinie ggCabLightDimButton.Load(Parser, DynamicObject->mdKabina); } + else if( Label == "battery_sw:" ) { + + ggBatteryButton.Load( Parser, DynamicObject->mdKabina ); + } // ABu 090305: uniwersalne przyciski lub inne rzeczy else if (Label == "universal1:") { diff --git a/World.cpp b/World.cpp index c0188625..df7d559b 100644 --- a/World.cpp +++ b/World.cpp @@ -345,8 +345,10 @@ bool TWorld::Init(HWND NhWnd, HDC hDC) WriteLog("glLineWidth(1.0f);"); glLineWidth(1.0f); // glLineWidth(2.0f); - WriteLog("glPointSize(2.0f);"); - glPointSize(2.0f); + WriteLog("glPointSize(3.0f);"); + glPointSize(3.0f); +// glHint( GL_POINT_SMOOTH_HINT, GL_NICEST ); // Really Nice Perspective Calculations +// glEnable( GL_POINT_SMOOTH ); // ----------- LIGHTING SETUP ----------- // Light values and coordinates