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

event0 now works again,

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)
This commit is contained in:
Firleju
2015-04-16 14:33:13 +02:00
parent 4873d8431c
commit 049455a5e7
5 changed files with 28 additions and 16 deletions

View File

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