mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 23:19:19 +02:00
Merge remote-tracking branch 'youby/master' into sim
This commit is contained in:
@@ -309,6 +309,11 @@ global_settings::ConfigParse(cParser &Parser) {
|
|||||||
Parser.getTokens(1, false);
|
Parser.getTokens(1, false);
|
||||||
Parser >> iMultiplayer;
|
Parser >> iMultiplayer;
|
||||||
}
|
}
|
||||||
|
else if (token == "isolatedtrainnumber")
|
||||||
|
{
|
||||||
|
Parser.getTokens(1, false);
|
||||||
|
Parser >> bIsolatedTrainName;
|
||||||
|
}
|
||||||
else if (token == "maxtexturesize")
|
else if (token == "maxtexturesize")
|
||||||
{
|
{
|
||||||
// wymuszenie przeskalowania tekstur
|
// wymuszenie przeskalowania tekstur
|
||||||
@@ -1226,6 +1231,7 @@ global_settings::export_as_text( std::ostream &Output ) const {
|
|||||||
export_as_text( Output, "feedbackmode", iFeedbackMode );
|
export_as_text( Output, "feedbackmode", iFeedbackMode );
|
||||||
export_as_text( Output, "feedbackport", iFeedbackPort );
|
export_as_text( Output, "feedbackport", iFeedbackPort );
|
||||||
export_as_text( Output, "multiplayer", iMultiplayer );
|
export_as_text( Output, "multiplayer", iMultiplayer );
|
||||||
|
export_as_text( Output, "isolatedtrainnumber", bIsolatedTrainName);
|
||||||
export_as_text( Output, "maxtexturesize", iMaxTextureSize );
|
export_as_text( Output, "maxtexturesize", iMaxTextureSize );
|
||||||
export_as_text( Output, "maxcabtexturesize", iMaxCabTextureSize );
|
export_as_text( Output, "maxcabtexturesize", iMaxCabTextureSize );
|
||||||
export_as_text( Output, "movelight", fMoveLight );
|
export_as_text( Output, "movelight", fMoveLight );
|
||||||
|
|||||||
@@ -204,6 +204,7 @@ struct global_settings {
|
|||||||
#endif
|
#endif
|
||||||
// multiplayer
|
// multiplayer
|
||||||
int iMultiplayer{ 0 }; // blokada działania niektórych eventów na rzecz kominikacji
|
int iMultiplayer{ 0 }; // blokada działania niektórych eventów na rzecz kominikacji
|
||||||
|
bool bIsolatedTrainName{ false }; //wysyłanie zajęcia odcinka izolowanego z nazwą pociągu
|
||||||
// other
|
// other
|
||||||
std::string AppName{ "EU07" };
|
std::string AppName{ "EU07" };
|
||||||
std::string asVersion; // z opisem
|
std::string asVersion; // z opisem
|
||||||
|
|||||||
@@ -1212,6 +1212,7 @@ public:
|
|||||||
double InitialCtrlDelay = 0.0; double CtrlDelay = 0.0; /* -//- -//- miedzy kolejnymi poz.*/
|
double InitialCtrlDelay = 0.0; double CtrlDelay = 0.0; /* -//- -//- miedzy kolejnymi poz.*/
|
||||||
double CtrlDownDelay = 0.0; /* -//- -//- przy schodzeniu z poz.*/ /*hunter-101012*/
|
double CtrlDownDelay = 0.0; /* -//- -//- przy schodzeniu z poz.*/ /*hunter-101012*/
|
||||||
int FastSerialCircuit = 0;/*0 - po kolei zamyka styczniki az do osiagniecia szeregowej, 1 - natychmiastowe wejscie na szeregowa*/ /*hunter-111012*/
|
int FastSerialCircuit = 0;/*0 - po kolei zamyka styczniki az do osiagniecia szeregowej, 1 - natychmiastowe wejscie na szeregowa*/ /*hunter-111012*/
|
||||||
|
int BackwardsBranchesAllowed = 1;
|
||||||
int AutoRelayType = 0; /*0 -brak, 1 - jest, 2 - opcja*/
|
int AutoRelayType = 0; /*0 -brak, 1 - jest, 2 - opcja*/
|
||||||
bool CoupledCtrl = false; /*czy mainctrl i scndctrl sa sprzezone*/
|
bool CoupledCtrl = false; /*czy mainctrl i scndctrl sa sprzezone*/
|
||||||
bool HasCamshaft { false };
|
bool HasCamshaft { false };
|
||||||
|
|||||||
@@ -6803,7 +6803,7 @@ bool TMoverParameters::AutoRelayCheck(void)
|
|||||||
else
|
else
|
||||||
{ // zmieniaj mainctrlactualpos
|
{ // zmieniaj mainctrlactualpos
|
||||||
if( ( DirActive < 0 ) && ( TrainType != dt_PseudoDiesel ) ) {
|
if( ( DirActive < 0 ) && ( TrainType != dt_PseudoDiesel ) ) {
|
||||||
if( RList[ MainCtrlActualPos + 1 ].Bn > 1 ) {
|
if( RList[ MainCtrlActualPos + 1 ].Bn > BackwardsBranchesAllowed) {
|
||||||
return false; // nie poprawiamy przy konwersji
|
return false; // nie poprawiamy przy konwersji
|
||||||
// return ARC;// bbylo exit; //Ra: to powoduje, że EN57 nie wyłącza się przy IminLo
|
// return ARC;// bbylo exit; //Ra: to powoduje, że EN57 nie wyłącza się przy IminLo
|
||||||
}
|
}
|
||||||
@@ -10411,6 +10411,7 @@ void TMoverParameters::LoadFIZ_Cntrl( std::string const &line ) {
|
|||||||
( ToLower( extract_value( "FSCircuit", line ) ) == "yes" ) ?
|
( ToLower( extract_value( "FSCircuit", line ) ) == "yes" ) ?
|
||||||
1 :
|
1 :
|
||||||
0;
|
0;
|
||||||
|
extract_value( BackwardsBranchesAllowed, "BackwardsBranchesAllowed", line, "" );
|
||||||
|
|
||||||
extract_value( StopBrakeDecc, "SBD", line, "" );
|
extract_value( StopBrakeDecc, "SBD", line, "" );
|
||||||
extract_value( ReleaseParkingBySpringBrake, "ReleaseParkingBySpringBrake", line, "" );
|
extract_value( ReleaseParkingBySpringBrake, "ReleaseParkingBySpringBrake", line, "" );
|
||||||
|
|||||||
16
Track.cpp
16
Track.cpp
@@ -21,6 +21,7 @@ http://mozilla.org/MPL/2.0/.
|
|||||||
#include "MemCell.h"
|
#include "MemCell.h"
|
||||||
#include "messaging.h"
|
#include "messaging.h"
|
||||||
#include "DynObj.h"
|
#include "DynObj.h"
|
||||||
|
#include "Driver.h"
|
||||||
#include "AnimModel.h"
|
#include "AnimModel.h"
|
||||||
#include "Track.h"
|
#include "Track.h"
|
||||||
#include "Timer.h"
|
#include "Timer.h"
|
||||||
@@ -140,7 +141,20 @@ void TIsolated::Modify(int i, TDynamicObject *o)
|
|||||||
if (evBusy)
|
if (evBusy)
|
||||||
simulation::Events.AddToQuery(evBusy, o); // dodanie zajętości do kolejki
|
simulation::Events.AddToQuery(evBusy, o); // dodanie zajętości do kolejki
|
||||||
if (Global.iMultiplayer) // jeśli multiplayer
|
if (Global.iMultiplayer) // jeśli multiplayer
|
||||||
multiplayer::WyslijString(asName, 11); // wysłanie pakietu o zajęciu
|
{
|
||||||
|
auto const *owner = (
|
||||||
|
((o->Mechanik != nullptr) && (o->Mechanik->primary())) ?
|
||||||
|
o->Mechanik :
|
||||||
|
o->ctOwner);
|
||||||
|
auto textline = owner != nullptr ? Bezogonkow(owner->TrainName(), true) : "none";
|
||||||
|
if ("none" != textline && Global.bIsolatedTrainName) {
|
||||||
|
textline = ":" + Bezogonkow(owner->TrainName(), true);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
textline = "";
|
||||||
|
}
|
||||||
|
multiplayer::WyslijString(asName+textline, 11); // wysłanie pakietu o zajęciu
|
||||||
|
}
|
||||||
if (pMemCell) // w powiązanej komórce
|
if (pMemCell) // w powiązanej komórce
|
||||||
pMemCell->UpdateValues( "", 0, int( pMemCell->Value2() ) | 1, basic_event::flags::value2 ); // zmieniamy ostatnią wartość na nieparzystą
|
pMemCell->UpdateValues( "", 0, int( pMemCell->Value2() ) | 1, basic_event::flags::value2 ); // zmieniamy ostatnią wartość na nieparzystą
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user