Fix crash when opening canoes

This commit is contained in:
Michał Janiszewski 2016-03-19 00:47:06 +01:00
parent fdead70403
commit c1a413c298
1 changed files with 6 additions and 0 deletions

View File

@ -6597,6 +6597,9 @@ void sub_6DBF3E(rct_vehicle *vehicle)
trackType,
0
);
if (mapElement == NULL) {
return;
}
if (RCT2_GLOBAL(0x00F64E1C, uint32) == 0xFFFFFFFF) {
RCT2_GLOBAL(0x00F64E1C, uint32) = (mapElement->properties.track.sequence >> 4) & 7;
}
@ -6663,6 +6666,9 @@ bool vehicle_update_track_motion_forwards_get_new_track(rct_vehicle *vehicle, ui
trackType,
0
);
if (mapElement == NULL) {
return false;
}
if (trackType == TRACK_ELEM_CABLE_LIFT_HILL && vehicle == RCT2_GLOBAL(0x00F64E04, rct_vehicle*)) {
RCT2_GLOBAL(0x00F64E18, uint32) |= VEHICLE_UPDATE_MOTION_TRACK_FLAG_11;
}