From 98178c25601847e90d52f8e835083f739c614f61 Mon Sep 17 00:00:00 2001 From: IntelOrca Date: Sun, 20 Dec 2015 14:21:06 +0000 Subject: [PATCH] refactor callprocs in vehicle.c --- src/ride/vehicle.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/ride/vehicle.c b/src/ride/vehicle.c index a42f3a445d..7829fadb3b 100644 --- a/src/ride/vehicle.c +++ b/src/ride/vehicle.c @@ -1620,8 +1620,9 @@ static void vehicle_update_waiting_to_depart(rct_vehicle* vehicle) { & RIDE_TYPE_FLAG_CAN_SYNCHRONISE_ADJACENT_STATIONS) { if (ride->depart_flags & RIDE_DEPART_SYNCHRONISE_WITH_ADJACENT_STATIONS) { if (vehicle->update_flags & VEHICLE_UPDATE_FLAG_WAIT_ON_ADJACENT) { - if (RCT2_CALLPROC_X(0x006DE287, 0, 0, 0, 0, (int)vehicle, 0, 0) & 0x100) + if (sub_6DE287(vehicle)) { return; + } } } } @@ -1776,6 +1777,15 @@ static void vehicle_update_waiting_to_depart(rct_vehicle* vehicle) { } } +/** + * + * rct2: 0x006DE287 + */ +static bool sub_6DE287(rct_vehicle *vehicle) +{ + return RCT2_CALLPROC_X(0x006DE287, 0, 0, 0, 0, (int)vehicle, 0, 0) & 0x100; +} + /** * * rct2: 0x006D9EB0 @@ -2963,7 +2973,8 @@ static void vehicle_update_travelling_cable_lift(rct_vehicle* vehicle) { * * rct2: 0x006D9820 */ -static void vehicle_update_travelling_boat(rct_vehicle* vehicle) { +static void vehicle_update_travelling_boat(rct_vehicle* vehicle) +{ vehicle_check_if_missing(vehicle); RCT2_CALLPROC_X(0x006DA717, 0, 0, 0, 0, (int)vehicle, 0, 0); }