16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-21 18:19:19 +02:00

restored keyboard controls for events; tweaks to intensity of vehicle spotlights, minor bug fixes

This commit is contained in:
tmj-fstate
2017-03-06 03:27:52 +01:00
parent d920644af8
commit 89fe4e7f7c
8 changed files with 88 additions and 47 deletions

View File

@@ -90,7 +90,7 @@ double PFVa( double PH, double PL, double const S, double LIM, double const DP )
LIM = LIM + 1;
PH = PH + 1; // wyzsze cisnienie absolutne
PL = PL + 1; // nizsze cisnienie absolutne
double sg = PL / PH; // bezwymiarowy stosunek cisnien
double sg = std::min( 1.0, PL / PH ); // bezwymiarowy stosunek cisnien. NOTE: sg is capped at 1 to prevent calculations from going awry. TODO, TBD: log these as errors?
double FM = PH * 197 * S; // najwyzszy mozliwy przeplyw, wraz z kierunkiem
if ((LIM - PL) < DP)
FM = FM * (LIM - PL) / DP; // jesli jestesmy przy nastawieniu, to zawor sie przymyka