Skip to content

Commit

Permalink
event0 now works again,
Browse files Browse the repository at this point in the history
event0 and all eventall can be assign to track by <event_name>:<track_name>
vehicle can have only emergency brake, steering by Num1 and Num7 (by yB)
  • Loading branch information
firleju committed Apr 16, 2015
1 parent 4873d84 commit 049455a
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 16 deletions.
7 changes: 5 additions & 2 deletions DynObj.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2009,8 +2009,11 @@ void TDynamicObject::Move(double fDistance)
bEnabled &= Axle1.Move(fDistance, iAxleFirst); // oś z tyłu pojazdu prusza się pierwsza
bEnabled &= Axle0.Move(fDistance /*-fAdjustment*/, !iAxleFirst); // oś z przodu pojazdu
}
// Axle2.Move(fDistance,false); //te nigdy pierwsze nie są
// Axle3.Move(fDistance,false);
else //gf: bez wywolania Move na postoju nie ma event0
{
bEnabled&=Axle1.Move(fDistance,iAxleFirst); //oś z tyłu pojazdu prusza się pierwsza
bEnabled&=Axle0.Move(fDistance,!iAxleFirst); //oś z przodu pojazdu
}
if (fDistance != 0.0) // nie liczyć ponownie, jeśli stoi
{ // liczenie pozycji pojazdu tutaj, bo jest używane w wielu miejscach
vPosition = 0.5 * (Axle1.pPosition + Axle0.pPosition); //środek między skrajnymi osiami
Expand Down
13 changes: 4 additions & 9 deletions EU07.bpr
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ IncludeVerInfo=1
AutoIncBuild=0
MajorVer=15
MinorVer=3
Release=1166
Build=469
Release=1167
Build=470
Debug=1
PreRelease=0
Special=0
Expand All @@ -71,8 +71,8 @@ CodePage=1250
[Version Info Keys]
CompanyName=EU07 Team
FileDescription=MaSzyna EU07-424
FileVersion=15.3.1166.469
InternalName=9th by Ra + SPKS + MP
FileVersion=15.3.1167.470
InternalName=9th by firleju + SPKS + MP
LegalCopyright=
LegalTrademarks=
OriginalFilename=eu07.exe
Expand Down Expand Up @@ -124,11 +124,6 @@ ShowInfoMsgs=0
LinkDebugVcl=0
LinkCGLIB=0

[CORBA]
AddServerUnit=1
AddClientUnit=1
PrecompiledHeaders=1

[Language]
ActiveLang=
ProjectLang=
Expand Down
4 changes: 2 additions & 2 deletions Globals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ AnsiString Global::asSky = "1";
int Global::iReCompile = 0; // zwiêkszany, gdy trzeba odœwie¿yæ siatki
HWND Global::hWnd = NULL; // uchwyt okna
int Global::iCameraLast = -1;
AnsiString Global::asRelease = "15.3.1166.469";
AnsiString Global::asRelease = "15.3.1167.470";
AnsiString Global::asVersion =
"Compilation 2015-03-25, release " + Global::asRelease + "."; // tutaj, bo wysy³any
"Compilation 2015-04-14, release " + Global::asRelease + "."; // tutaj, bo wysy³any
int Global::iViewMode = 0; // co aktualnie widaæ: 0-kabina, 1-latanie, 2-sprzêgi, 3-dokumenty
int Global::iTextMode = 0; // tryb pracy wyœwietlacza tekstowego
int Global::iScreenMode[12] = {0, 0, 0, 0, 0, 0,
Expand Down
18 changes: 16 additions & 2 deletions Ground.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3191,13 +3191,27 @@ void TGround::InitTracks()
if (Global::iHiddenEvents & 1)
if (!Current->asName.IsEmpty())
{ // jeœli podana jest nazwa torów, mo¿na szukaæ eventów skojarzonych przez nazwê
if (Track->asEvent1Name.IsEmpty())
if (Track->asEvent0Name.IsEmpty())
if (FindEvent(Current->asName + ":event0"))
Track->asEvent0Name = Current->asName + ":event0";
if (Track->asEvent1Name.IsEmpty())
if (FindEvent(Current->asName + ":event1"))
Track->asEvent1Name = Current->asName + ":event1";
if (Track->asEvent2Name.IsEmpty())
if (FindEvent(Current->asName + ":event2"))
Track->asEvent2Name = Current->asName + ":event2";
}

if (Track->asEventall0Name.IsEmpty())
if (FindEvent(Current->asName+":eventall0"))
Track->asEventall0Name=Current->asName+":eventall0";
if (Track->asEventall1Name.IsEmpty())
if (FindEvent(Current->asName+":eventall1"))
Track->asEventall1Name=Current->asName+":eventall1";
if (Track->asEventall2Name.IsEmpty())
if (FindEvent(Current->asName+":eventall2"))
Track->asEventall2Name=Current->asName+":eventall2";

}
Track->AssignEvents(
Track->asEvent0Name.IsEmpty() ? NULL : FindEvent(Track->asEvent0Name),
Track->asEvent1Name.IsEmpty() ? NULL : FindEventScan(Track->asEvent1Name),
Expand Down
2 changes: 1 addition & 1 deletion McZapkie/_mover.pas
Original file line number Diff line number Diff line change
Expand Up @@ -4451,7 +4451,7 @@ function T_MoverParameters.BrakeForce(Track:TTrackParam):real;
// if (LocalBrake=ManualBrake)or(MBrake=true)) and (BrakePress<0.3) then
// Fb:=UnitBrakeForce*NBpA {ham. reczny dziala na jedna os}
// else //yB: to nie do konca ma sens, ponieważ ręczny w wagonie działa na jeden cylinder hamulcowy/wózek, dlatego potrzebne są oddzielnie liczone osie
Fb:=UnitBrakeForce*NBrakeAxles*NBpA;
Fb:=UnitBrakeForce*NBrakeAxles*Max0R(1,NBpA);

// u:=((BrakePress*P2FTrans)-BrakeCylSpring*BrakeCylMult[BCMFlag]/BrakeCylNo-0.83*BrakeSlckAdj/(BrakeCylNo))*BrakeCylNo;
{ end; }
Expand Down

0 comments on commit 049455a

Please sign in to comment.