The staff list window modifies the sprites purely for local state causing a false positive desync warning to pop up in multiplayer. This now causes it to only happen if the map window is also open. This is also a performance improvement.
#5164
- Fix tile unselectable after closing the window
- Remove unused code (scenery has no dropdown)
- Drawing dashes in X/Y spinners when no tile is selected
This is a continuation of
https://github.com/OpenRCT2/OpenRCT2/pull/5094.
While the previous PR cured some desyncs, the real issue remained –
logic of the game considers ghost elements. This change fixes it, to
some extent.
The problem here is we already remove ghosts when interacting over
network (e.g. `footpath_provisional_remove` in `footpath_place_real`),
but this happens only when such a game command is executed in OpenRCT2.
Whenever SV6 gets imported, path map elements already have had edges
calculated for them, neighbours being ghost or not, and we don't update
it. OpenRCT2/OpenRCT2#5094 is one, naïve, way to solve, the other option
would be to recalculate all the paths whenever we load SV6.
Both horizontal and vertical scrollbars had a malfunctioning widget: both the
right and bottom widgets weren't fired properly.
The bug was less noticeable for vertical scrollbars, as clicking the widget would
be treated as clicking empty space, which did not happen for the horizontal
scrollbar.
This patch fixes the underlying inconsistencies, making sure the widgets for
both types of scrollbars work -- when using either scrollbar, or when combined.
Currently the game window is always created with an OpenGL context which then means that opengl32.dll and other modules are loaded. The OpenGL window flag will now only be used if the config drawing engine is set to OpenGL. This now means that a restart of the game is required when switching to the OpenGL drawing engine for Windows.
#5104
Removed display of raw cut height value.
Changed display of cut height in METRIC/SI from 1DP to 2DP to display odd raw heights with accurate value.
Changed display of cut height in IMPERIAL to 1DP to display odd raw heights with accurate value.
The window size did not match the sizes given to window_create, causing
the window to think it was actually smaller, and as a result not clearing
the screen properly. This commit adds the WW and WH macros and uses them.
This commit also has a few formatting changes.
Paint clipping is a possible future feature to assist players building in cluttered areas of a park by controlling which map elements and sprites are rendered, providing a clearer view for construction, inspection, etc.
Only clip height is supported in this prototype.
Map elements are clipped according to the map element base height (meaning *all* scenery on that map element is currently clipped with it).
Sprites are clipped according to their z value being within the "sprite volume" of any non-clipped map element (which means below clip height + 2).
Control is only provided through the console in this prototype - use the command: set paint_clip_height _value_
To turn clipping off use the command: set paint_clip_height 255
Clip heights are limited to multiples of two to coincide with the native heights of map elements.
Command "get paint_clip_height" prints the clip height as a raw value as well as the equivalent height in ft and m as used when displaying heights in-game.
At this time only painting of the main viewport is affected. There is no change to any input control handling.
Cleaned up widget positions - looks like a proper interface now.
Remaining Issues:
- Window only displays correctly every second time it is opened;
- Clip height in Units (ft/m) is displayed without the decimal point;
- Scroll bar is not working;
- Decide how the View menu entry should work.
Paint clipping is a possible future feature to assist players building in cluttered areas of a park by controlling which map elements and sprites are rendered, providing a clearer view for construction, inspection, etc.
Only clip height is supported in this prototype.
Map elements are clipped according to the map element base height (meaning *all* scenery on that map element is currently clipped with it).
Sprites are clipped according to their z value being within the "sprite volume" of any non-clipped map element (which means below clip height + 2).
Control is only provided through the console in this prototype - use the command: set paint_clip_height _value_
To turn clipping off use the command: set paint_clip_height 255
Clip heights are limited to multiples of two to coincide with the native heights of map elements.
Command "get paint_clip_height" prints the clip height as a raw value as well as the equivalent height in ft and m as used when displaying heights in-game.
At this time only painting of the main viewport is affected. There is no change to any input control handling.
Ghost elements are notoriously a reason of network desyncs, because they
don't get transferred over network. They are meant to be local only and
disregarded by any logic, but it is not yet the case in many places.
Upon saving, we *remove* all the ghost elements (by calling
`scenario_fix_ghosts`), based on assumption they can only be caused by
local interaction. Testing has shown there are `sv6`s in the wild that
have elements marked as ghosts and this could lead to a situation where
we strip away parts of the park. This also causes network desyncs for
reason stated above.
As we strip elements with ghost flag from saves anyway, it should be
safe to assume none of our saves introduce ghosts and this issue is
limited to hacked parks only. One example of such park is [Cocopa
Bay](http://www.nedesigns.com/park/3473/cocopa-bay/).
This change removes the flag on all map elements while importing. This
is much less invasive than removing all ghost elements on importing, as
they may contain some actual data. This ~~fixes~~ hides the desync that
could be seen in the Cocopa Bay park.
As this doesn't change any in-game logic, no network version update is
necessary.
#5094