Skip to content

Commit 8fb32c3

Browse files
committed
- event: preserve trains collision on wrap/restart
1 parent c7fb06a commit 8fb32c3

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

src_rebuild/Game/C/event.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1250,10 +1250,7 @@ void SetUpEvents(int full)
12501250
evt = event;
12511251

12521252
// in Beat the train we spawn more train cars
1253-
if (gCurrentMissionNumber == 22)
1254-
cCarriages = 9;
1255-
else
1256-
cCarriages = 2;
1253+
cCarriages = (gCurrentMissionNumber == 22) ? 9 : 2;
12571254

12581255
for (i = 0; i < cCarriages; i++)
12591256
{
@@ -2173,12 +2170,12 @@ void StepPathEvent(EVENT* ev)
21732170
{
21742171
// [A] preserve direction flag or train will get stuck
21752172
// i might have been decompiled it wrong but now it works
2176-
dir = ev->flags & 0x400;
2173+
// also preserve collision if it has one (for vegas trains)
2174+
dir = ev->flags & 0x600;
21772175

21782176
InitTrain(ev, 0, GameLevel == 0 ? 0 : 1);
21792177

2180-
if (dir)
2181-
ev->flags |= 0x400;
2178+
ev->flags |= dir;
21822179
}
21832180
else if (ev->flags & 0x400)
21842181
{

0 commit comments

Comments
 (0)