Skip to content

Add individual vehicle motion update flag#13607

Merged
duncanspumpkin merged 1 commit into
OpenRCT2:developfrom
duncanspumpkin:single_car
Dec 21, 2020
Merged

Add individual vehicle motion update flag#13607
duncanspumpkin merged 1 commit into
OpenRCT2:developfrom
duncanspumpkin:single_car

Conversation

@duncanspumpkin

Copy link
Copy Markdown
Contributor

This can be used in conjunction with #13593 to change the placement of vehicles on a track.

Example use:

        veh->remaining_distance += distanceToMove;
        veh->SetUpdateFlag(VEHICLE_UPDATE_FLAG_SINGLE_CAR);
        veh->UpdateTrackMotion(nullptr);
        veh->ClearUpdateFlag(VEHICLE_UPDATE_FLAG_SINGLE_CAR);

remaining_distance is internal distance units. Issue at present is that velocity of the vehicle is also applied. Unsure if that is useful or not. If not can easily fix that by changing how the override of the update code works.

Comment thread src/openrct2/ride/Vehicle.h Outdated
This can be used in conjuction with OpenRCT2#13593 to change the placement of vehicles on a track
@duncanspumpkin duncanspumpkin merged commit 6da4a8d into OpenRCT2:develop Dec 21, 2020
@duncanspumpkin duncanspumpkin deleted the single_car branch December 21, 2020 13:25
@tupaschoal tupaschoal added this to the v0.3.3 milestone Dec 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants