Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Track Design GameAction #10189

Merged
merged 15 commits into from
Dec 15, 2019
Merged

Conversation

duncanspumpkin
Copy link
Contributor

@duncanspumpkin duncanspumpkin commented Nov 3, 2019

No more Game Commands. Woooo!

Still some work to be done on this. Desyncs on ghosts and also need to add a callback.
Need to network direction of design currently uses global var.
I've created the action as a separate cpp file as I want to move a bunch of code into this and don't want a ridiculously polluted header.
Desync on ghosts is caused by ride demolish and also by peeps checking ride count.

Closes #6327

@duncanspumpkin duncanspumpkin added work in progress network version Network version needs updating - double check before merging! game actions Relates to one of the serialisable atomic game actions. labels Nov 3, 2019
@duncanspumpkin duncanspumpkin added this to In Progress in New Game Action Framework via automation Nov 3, 2019
@duncanspumpkin
Copy link
Contributor Author

Note to self serialise the track design vehicle style

@duncanspumpkin
Copy link
Contributor Author

CheckIfLost has different results depending on ghosts when placing second ride.

src/openrct2-ui/WindowManager.cpp Outdated Show resolved Hide resolved
_lastTrackDesignCount = 0;
}
else if (item.type != _lastTrackDesignCountRideType.type || item.entry_index != _lastTrackDesignCountRideType.entry_index)
if (item.type != _lastTrackDesignCountRideType.type || item.entry_index != _lastTrackDesignCountRideType.entry_index)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't ride_list_item just a type and an entry_index? If so, having the operator== and operator!= implemented there would make this a lot more readable

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Slightly out of scope but I agree.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had a little play around and decided I wouldn't do it in this PR as to do this sensibly I needed to modify the window.h header and it had a bunch of dependencies that I didn't want to work out how to resolve at this time.

src/openrct2-ui/windows/TrackDesignPlace.cpp Outdated Show resolved Hide resolved
src/openrct2-ui/windows/TrackDesignPlace.cpp Outdated Show resolved Hide resolved
src/openrct2/actions/TrackDesignAction.h Outdated Show resolved Hide resolved
src/openrct2/actions/GameActionCompat.cpp Outdated Show resolved Hide resolved
src/openrct2/actions/TrackDesignAction.cpp Outdated Show resolved Hide resolved
src/openrct2/actions/TrackDesignAction.cpp Outdated Show resolved Hide resolved
src/openrct2/actions/TrackDesignAction.cpp Outdated Show resolved Hide resolved
src/openrct2/actions/TrackDesignAction.cpp Outdated Show resolved Hide resolved
@@ -95,6 +95,9 @@ rct_window* window_loadsave_open(int32_t type, const char* defaultName, loadsave
rct_window* window_track_place_open(const struct track_design_file_ref* tdFileRef);
rct_window* window_track_manage_open(struct track_design_file_ref* tdFileRef);

void TrackPlaceClearProvisionalTemporarily();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this really the best way to do it? We should eventually come up with a way to prevent peeps from accessing ghost elements. For the time being its okay, the way ghosts work should have a massive overhaul at some point.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is the best way at the moment. Its a real pain though as it means debug builds are too laggy for my computer with this constant placing. There are quite a few things that technically will cause a desync without doing something like this.

src/openrct2-ui/windows/TrackDesignPlace.cpp Outdated Show resolved Hide resolved
src/openrct2-ui/windows/TrackDesignPlace.cpp Outdated Show resolved Hide resolved
_lastTrackDesignCount = 0;
}
else if (item.type != _lastTrackDesignCountRideType.type || item.entry_index != _lastTrackDesignCountRideType.entry_index)
if (item.type != _lastTrackDesignCountRideType.type || item.entry_index != _lastTrackDesignCountRideType.entry_index)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Slightly out of scope but I agree.

@Gymnasiast
Copy link
Member

Gymnasiast commented Dec 11, 2019

Here is a patch to fix the Xcode project.

xcodepatch.diff.txt

@duncanspumpkin duncanspumpkin merged commit b767351 into OpenRCT2:develop Dec 15, 2019
New Game Action Framework automation moved this from In Progress to Completed Dec 15, 2019
@duncanspumpkin duncanspumpkin deleted the track_ac branch December 15, 2019 17:11
janisozaur added a commit that referenced this pull request Mar 24, 2020
- Feature: [#3154] Use a random title sequence each time it is shown.
- Feature: [#6553] Android version now runs in full screen.
- Feature: [#7865] Transport rides can now be synchronised.
- Feature: [#9073] Shortcut keys for the Tile Inspector.
- Feature: [#10305] Add two shortcuts for increasing and decreasing the scaling factor.
- Feature: [#10189] Make Track Designs work in multiplayer.
- Feature: [#10357] Added window for scenery scatter tool, allowing for area and density selection.
- Feature: [#10637] Console command to remove all floating objects.
- Change: [#1164] Use available translations for shortcut key bindings.
- Change: [#10997] Speed is automatically reset to normal upon scenario completion.
- Fix: [#2485] Hide Vertical Faces not applied to the edges of water.
- Fix: [#5249] No collision detection when building ride entrance at heights > 85.5m.
- Fix: [#6766] Changelog window doesn't open on some platforms.
- Fix: [#7784] Vehicle tab takes 1st car colour instead of tab_vehicle's colour.
- Fix: [#7854] Cannot build a custom spiral roller coaster design.
- Fix: [#7854] Empty entries in spiral roller coaster designs list.
- Fix: [#8151] Game freezes upon demolishing mazes at odd heights.
- Fix: [#8875] RCT1 competition scenarios are classified incorrectly.
- Fix: [#10176] Mistake in the sprite for the land tool's 6x6 grid.
- Fix: [#10196] Doors unable to be placed at end of track corners.
- Fix: [#10228] Can't import RCT1 Deluxe from Steam.
- Fix: [#10313] Path furniture can be placed on level crossings.
- Fix: [#10325] Crash when banners have no text.
- Fix: [#10376] No ratings generated when a shop and track intersect.
- Fix: [#10420] Money effect causing false positive desync.
- Fix: [#10477] Large Scenery cannot be placed higher using SHIFT.
- Fix: [#10489] Hosts last player action not being synchronized.
- Fix: [#10543] Secondary shop item prices are not imported correctly from RCT1 saves.
- Fix: [#10547] RCT1 parks have too many rides available.
- Fix: [#10587] Update last action coordinates on correct player.
- Fix: [#10631] Game bugs out and crashes if you get too many stations via copying stations with the tile inspector.
- Fix: [#10662] Duck cheat tooltips look odd and do not explain anything.
- Fix: [#10694] The lift hill speed of the flying roller coaster cannot be changed (original bug).
- Fix: [#10705] Apply multithreaded rendering to all viewports.
- Fix: [#10739] Mountain tool overlay for even-numbered selections.
- Fix: [#10752] Mute button state not correctly set at startup.
- Fix: [#10822] Can place too many peep spawns.
- Fix: [#10898] Banner text has an offset in tile inspector window.
- Fix: [#10904] RCT1/LL-scenarios with red water won't open.
- Fix: [#10941] The Clear Scenery tool gives refunds for ghost elements.
- Fix: [#10963] Light effects are drawn off-centre in some rotations.
- Fix: [#10993] Bottom toolbar not refreshing when a guest leaves the park.
- Fix: [#11001] Rides list does not use natural sorting.
- Fix: [objects#54] Stage Coach cars are not considered covered by the game.
- Fix: [objects#56] Handymen cut grass incorrectly.
- Improved: [#682] The staff patrol area is now drawn on the water, instead of on the surface under water.
- Improved: [#10858] Added horizontal grid lines to finance charts.
- Improved: [#10884] Added y-axes and labels to park window charts.
- Improved: [#10970] Introduced optional light effects for vehicles at night.
- Removed: [#6898] LOADMM and LOADRCT1 title sequence commands (use LOADSC instead).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
game actions Relates to one of the serialisable atomic game actions. network version Network version needs updating - double check before merging!
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Refactor game commands to game actions.
4 participants