1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-23 06:44:38 +01:00
Commit Graph

183 Commits

Author SHA1 Message Date
Michael Steenbeek
073e4b0ccc Fix #7690: Problem with guests freezing on certain tiles of path (#9723) 2019-08-04 17:19:40 +02:00
Ted John
3f8890afde Fix remaining errors and a few bugs 2019-07-29 19:18:16 +01:00
Ted John
6fff2079f9 Refactor ride name to dynamic args and std::string 2019-07-29 19:18:16 +01:00
Matt
f3638ca858 Address code review 2019-07-24 18:12:25 +02:00
Matt
98a17fe8d9 Refactor create_sprite and remove unnecessary move_sprite_to_list 2019-07-24 17:53:51 +02:00
Duncan
ab5f5b20cd Use enum class for RCT2_SOUND (#9618)
* Use enum class for RCT2_SOUND

* Fix formatting. Fix mistaken declaration.

* Change name of enum to SoundId

* Fix clang format
2019-07-22 19:02:45 +01:00
Cody Brittain
5342a6d9a9 Renamed sound enums for accuracy and organization 2019-07-20 12:41:36 +02:00
Peter
dd948f99c4 #9295 Refactor rct_vehcile->status to rct_vehicle::SetState() (#9329)
Fix #9295. Refactor rct_vehicle->status to rct_vehicle::SetState()

Created rct_vehicle::SetState() and refactored all assignments to
rct_vehcile->status. SetState also includes a call to
vehicle_invalidate_window(), so it cannot be forgotten.
2019-06-09 15:45:56 +01:00
Ted John
6f0298deb3 Refactor ride measurement storage 2019-06-09 11:55:41 +02:00
Ted John
5fa0c18455 Do not provide test results for simulate 2019-05-28 16:50:08 +01:00
Ted John
5f1f428bce Add and use Ride::SupportsStatus 2019-05-28 16:50:08 +01:00
Ted John
c4e18e570e Add and implement simulation mode for rides 2019-05-28 16:50:08 +01:00
nexgenration
6b232f7e53 Fix#9197: Peep insert new thought (#9230)
Improve the readability of the codebase by moving functions into the relevant structures.
- Change name of peep_insert_new_thought to InsertNewThought.
- Update InsertNewThought definition to Guest::InsertNewThought.
2019-05-18 09:47:25 +01:00
nexgenration
ebefe5721b Fix #9198: Move vehicle invalidate to member function
To further improve the readability of the codebase the vehicle_invalidate function is now a member function of rct_vehicle.
2019-05-11 13:20:34 +01:00
Filip Gawin
6833da77e3 Simplify boolean expresions 2019-05-10 22:00:38 +02:00
Florian Will
8c109307cf Fix #8507: Incorrect change in vehicle rolling direction
In OpenRCT2, when vehicles roll backward on a long, flat track piece,
they would eventually change their direction of movement and move
forward instead, after their velocity reached -4095. The acceleration
due to rolling resistance and drag changes to 0 at that point, which
caused the "implicit boost" up to a velocity of ~+32k (close to 2km/h)
to trigger.

The behavior is different in vanilla RCT2, where vehicles just keep on
very slowly rolling backwards.

This commit disables the "implicit forward boost" for vehicles rolling
backward to mimic vanilla RCT2 behavior.
2019-05-02 22:22:59 +02:00
Nicole
d38fb6a7a2 Fix #8800: ensure tile_element_height is used correctly (#9087)
* Changed calls to tile_element_height to tile_element_water_height

* Changes to calls to tile_element_height

* Removed tile element_height, map_get_highest_land_height, and map_get lowest_land_height

3 functions removed due to relocation.

* Added function tile_element_height back to map.cpp

Added tile_element height back to map.cpp. Was unnecessarily deleted.

* Update Map.h

* water_height changes

* Update Scenario.cpp

* Update Scenario.cpp

* Fix 8800: applied clang format

* Removed unnecessary ANDs
2019-04-23 18:26:48 +01:00
Michael Steenbeek
42a1a8704d Use empty() for vectors; clean up bool comparisons (#9118) 2019-04-20 20:39:47 +02:00
Michael Steenbeek
8d83f5a549 Merge pull request #8978 from Gymnasiast/refactor/inversions
Close #8965: Refactor ride->inversions
2019-03-28 20:28:35 +01:00
Michael Steenbeek
a50c7836f8 Move more ride functions to struct methods (#8977) 2019-03-27 21:53:38 +01:00
Gymnasiast
a27e04e5a3 Limit inversions and holes to 31 (for now) 2019-03-27 19:44:46 +01:00
Gymnasiast
2a99c42242 Fix code to determine number of golf holes 2019-03-27 12:53:15 +01:00
Gymnasiast
64e51cd34b Close #8965: Refactor ride->inversions 2019-03-27 11:30:18 +01:00
Michael Steenbeek
1c570c8eec Move some ride functions to struct methods 2019-03-20 20:05:25 +01:00
Aaron van Geffen
2af13904c5 Update copyright notices for 2019. (#8903) 2019-03-17 07:16:15 +00:00
duncanspumpkin
6c92594c4b Use wall element as return 2019-03-16 16:35:30 +00:00
Duncan
9c4430736d Use get track element (#8884)
* Use get_track_element and change its return type

* Make things work

* Use helper functions where possible
2019-03-16 11:21:36 +00:00
Ted John
ca023f7c5e Fix #8829: invalid read in window_guest_open 2019-03-09 13:05:12 +00:00
Michał Janiszewski
1fa5606509 Simplify some code in Vehicle.cpp (#8595)
* Simplify some code in Vehicle.cpp

This reduces amount of code that depends on registers struct

* Simplify code in Vehicle.cpp

This removes one goto.
2019-03-03 15:25:47 +01:00
Ted John
cdec457abd Refactor peep struct 2019-02-28 20:28:58 +01:00
Duncan
f0092b7aae Merge pull request #8781 from duncanspumpkin/flag_refactor
Flag refactor
2019-02-27 19:18:02 +00:00
duncanspumpkin
83f7547bf2 Use Is/Set BlockBrakeClosed 2019-02-27 10:49:48 +00:00
duncanspumpkin
6495ffdb34 Use IsBlockedByVehicle 2019-02-27 10:49:48 +00:00
Ted John
bac3168a23 Refactor IsChild to IsHead 2019-02-25 17:58:22 +00:00
Ted John
ca807c5ed4 Refactor some IsChild references to GetHead 2019-02-25 17:51:25 +00:00
Ted John
520b1b4819 Try out changed sprite structs for main game 2019-02-25 12:29:31 +00:00
Ted John
d31e92e652 Fix #8742: access violation in vehicle_update_sound_params 2019-02-24 16:49:03 +01:00
ζeh Matt
8a6dd5c4dd Fix #8720: Desync due to boats colliding with ghost pieces 2019-02-19 11:39:48 +01:00
Ted John
ba445cb6ef Pass Ride* instead of ride_id_t 2019-02-13 20:16:42 +00:00
Ted John
fdf9f36fab Pass Ride* instead of ride_id_t 2019-02-12 23:58:45 +00:00
Matt
0237eaf498 Refactor number values to SPRITE_INDEX_NULL 2019-01-30 15:02:52 +01:00
ζeh Matt
6668a1fa86 Refactor remaining number values to RideStation::NO_TRAIN (#8655) 2019-01-30 13:49:46 +00:00
Michael Steenbeek
b4bef2fe7d Merge pull request #8560 from richard-fine/directions
Begin cleanup of direction handling
2019-01-18 19:09:39 +01:00
Ted John
8701286772 Use new ride_id_t typedef (#8561) 2019-01-12 10:11:55 +00:00
Richard Fine
e90e9dd73f Introduce many uses of direction_reverse
Change many of the places doing the ^2 trick to use direction_reverse instead, for improved readability.
2019-01-05 15:41:46 +00:00
Hielke Morsink
53ae48ffca Merge pull request #8550 from janisozaur/fallthroughs
Fix implicit fallthroughs
2019-01-04 23:27:02 +01:00
Hielke Morsink
5ef5e4153d Fix some more implicit and conditional fallthroughs 2019-01-04 22:26:56 +01:00
Michał Janiszewski
c5e1abcfb1 Fix implicit fallthroughs 2019-01-02 22:30:57 +01:00
Ted John
d979511628 Do code review suggestions 2019-01-02 19:46:13 +00:00
Ted John
37f76d1687 Move station fields into new station struct 2019-01-01 02:26:14 +00:00