Chunnel: Adjust z position of vehicles in chunnels to go "under" the water.

This commit is contained in:
Jonathan G Rennison
2017-03-05 18:05:04 +00:00
parent 0690dbb8bf
commit ec9f0371e8
4 changed files with 81 additions and 4 deletions

View File

@@ -1184,6 +1184,7 @@ bool IndividualRoadVehicleController(RoadVehicle *v, const RoadVehicle *prev)
v->x_pos = gp.x;
v->y_pos = gp.y;
v->UpdatePosition();
RoadZPosAffectSpeed(v, v->UpdateInclination(false, false, true));
if (v->IsDrawn()) v->Vehicle::UpdateViewport(true);
return true;
}
@@ -1555,7 +1556,7 @@ again:
v->x_pos = x;
v->y_pos = y;
v->UpdatePosition();
RoadZPosAffectSpeed(v, v->UpdateInclination(false, true));
RoadZPosAffectSpeed(v, v->UpdateInclination(false, true, v->state == RVSB_WORMHOLE));
return true;
}