Fixed miss centered vehicles. Fixed incorrect starting track progress. Fix newlines.

This commit is contained in:
duncanspumpkin 2016-01-23 18:50:36 +00:00
parent a4ccea81e9
commit a79a6969eb
4 changed files with 8 additions and 8 deletions

View File

@ -4322,7 +4322,7 @@ rct_vehicle *vehicle_create_car(
z += RCT2_GLOBAL(0x0097D21A + (ride->type * 8), sint8); z += RCT2_GLOBAL(0x0097D21A + (ride->type * 8), sint8);
vehicle->track_type = mapElement->properties.track.type << 2; vehicle->track_type = mapElement->properties.track.type << 2;
vehicle->var_34 = 0; vehicle->track_progress = 0;
vehicle->status = 0; vehicle->status = 0;
vehicle->sub_state = 0; vehicle->sub_state = 0;
vehicle->update_flags = 0; vehicle->update_flags = 0;
@ -4338,7 +4338,7 @@ rct_vehicle *vehicle_create_car(
sprite_move(chosenLoc.x, chosenLoc.y, z, (rct_sprite*)vehicle); sprite_move(chosenLoc.x, chosenLoc.y, z, (rct_sprite*)vehicle);
} else { } else {
regs.dl = 0; regs.dl = 0;
if (vehicleEntry->flags_b & VEHICLE_ENTRY_FLAG_B_13) { if (vehicleEntry->flags_b & VEHICLE_ENTRY_FLAG_B_12) {
regs.dl = 1; regs.dl = 1;
} }
@ -4396,9 +4396,9 @@ rct_vehicle *vehicle_create_car(
sprite_move(x, y, z, (rct_sprite*)vehicle); sprite_move(x, y, z, (rct_sprite*)vehicle);
vehicle->track_type = (mapElement->properties.track.type << 2) | (vehicle->sprite_direction >> 3); vehicle->track_type = (mapElement->properties.track.type << 2) | (vehicle->sprite_direction >> 3);
vehicle->var_34 = 31; vehicle->track_progress = 31;
if (vehicleEntry->flags_a & VEHICLE_ENTRY_FLAG_A_MINI_GOLF) { if (vehicleEntry->flags_a & VEHICLE_ENTRY_FLAG_A_MINI_GOLF) {
vehicle->var_34 = 15; vehicle->track_progress = 15;
} }
vehicle->update_flags = VEHICLE_UPDATE_FLAG_1; vehicle->update_flags = VEHICLE_UPDATE_FLAG_1;
if (vehicleEntry->flags_a & VEHICLE_ENTRY_FLAG_A_6) { if (vehicleEntry->flags_a & VEHICLE_ENTRY_FLAG_A_6) {

View File

@ -5149,4 +5149,4 @@ bool track_element_is_covered(int trackElementType)
default: default:
return false; return false;
} }
} }

View File

@ -5480,7 +5480,7 @@ static int vehicle_get_swing_amount(rct_vehicle *vehicle)
case TRACK_ELEM_S_BEND_LEFT: case TRACK_ELEM_S_BEND_LEFT:
case TRACK_ELEM_S_BEND_LEFT_COVERED: case TRACK_ELEM_S_BEND_LEFT_COVERED:
// loc_6D67EF // loc_6D67EF
if (vehicle->var_34 < 48) { if (vehicle->track_progress < 48) {
return 14; return 14;
} else { } else {
return -15; return -15;
@ -5489,7 +5489,7 @@ static int vehicle_get_swing_amount(rct_vehicle *vehicle)
case TRACK_ELEM_S_BEND_RIGHT: case TRACK_ELEM_S_BEND_RIGHT:
case TRACK_ELEM_S_BEND_RIGHT_COVERED: case TRACK_ELEM_S_BEND_RIGHT_COVERED:
// loc_6D67CC // loc_6D67CC
if (vehicle->var_34 < 48) { if (vehicle->track_progress < 48) {
return -14; return -14;
} else { } else {
return 15; return 15;

View File

@ -5135,4 +5135,4 @@ rct_map_element *map_get_track_element_at_of_type_seq(int x, int y, int z, int t
} while (!map_element_is_last_for_tile(mapElement++)); } while (!map_element_is_last_for_tile(mapElement++));
return NULL; return NULL;
} }