Commit Graph

565 Commits

Author SHA1 Message Date
Breno Rodrigues Guimarães ab53ddf59f Avoid fast-forwarding peep into the ride
The code being removed in the patch tries to fast forward a peep into the ride when it is the second peep for a vehicle that is used in pairs. Problem is that funds checking does not happen, so it happens that a peep may pay against its will.
Lets say a rich peep enters in line and a poor peep enters in line right after.
If the price of the ride is such that the rich peep can pay and the poor peep can't, it will be dragged into the ride because funds checking only happened for the first.
The second part of the patch just adjusts we consider the vehicle a full car if the second position is filled.

Add test to verify that a peep is not dragged into a ride it can't pay

This test puts two peeps in a Ferris Wheel. The first peep is rich and the second peep is poor. When they are both in line, the ride price is raised so that the poor peep can't pay.
Make sure the poor peep turns back and leaves the ride.

During development, a mistake in the logic would have broken all rides other than ferris wheels in a way that multiple guests could enter the same car.
Also add a test to make sure that is never broken.
2020-04-25 18:27:33 -03:00
Michael Steenbeek b89130e0f3
Use ObjectEntryIndex in more places (#11440) 2020-04-25 00:10:47 +02:00
Gymnasiast 99d270388b
Move ride start piece to RTD 2020-04-19 18:05:57 +02:00
Michael Steenbeek 8127437de1
Reduce direct ride type checking; move available piece lookup to RTD (#11353) 2020-04-19 13:32:43 +02:00
Gymnasiast 9044d0a263
Fix failing tests 2020-04-17 17:03:33 +02:00
Gymnasiast edd31d9f16
Move flags to RideTypeDescriptors 2020-04-17 17:03:33 +02:00
Gymnasiast 8a8eba0829
Clean up station functions and construction markers in TestPaint 2020-04-16 12:44:56 +02:00
duncanspumpkin bc04fb29c2 Remove all replay tests from 32bit builds 2020-04-12 11:18:23 +01:00
Gymnasiast 2f7a26e8da
Refactor station index a bit 2020-03-21 17:05:16 +01:00
Gymnasiast 6b9b60aa94
Fix compilation error in pathfinding test 2020-03-13 20:30:23 +01:00
Gymnasiast bdf681f440
Clean up many other coordinates 2020-03-13 12:03:43 +01:00
Michael Steenbeek be13c1fc87
Refactor more TileCoords 2020-03-07 21:07:18 +01:00
Gymnasiast c9afcaa5b3
Fix errors 2020-03-05 00:09:39 +01:00
Gymnasiast 38e7aafd07
Remove unused TestPaint defines (including one LocationXY16 occurrence) 2020-03-01 22:15:28 +01:00
Michael Steenbeek d5c4d78d49
Move vehicle track location to CoordsXYZ (#10856)
* Move vehicle track location to CoordsXYZ

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-03-01 15:45:51 -03:00
Gymnasiast 63430412be
Move TrackDataOld.cpp to Testpaint project 2020-02-22 20:29:35 +01:00
Gymnasiast 08ad1816d3
Move track paint function to RTDs 2020-02-22 20:15:00 +01:00
Michael Steenbeek 1690361b36
Increase size of ride_id_t to 16 bits 2020-02-16 22:21:17 +01:00
Duncan b8b539c16e
Modify next_x/y/z to become a CoordsXYZ (#10680)
* Modify next_x/y/z to become a CoordsXYZ

Should be further scope for refactoring from this.

* Make suggested changes

* Fix default construct issues
2020-02-11 22:01:14 +00:00
Ted John 5dbd3c7c0c Allow tests to work with CRLF test data 2020-02-02 15:47:50 +00:00
duncanspumpkin 85f2b0b21d Fix testpaint 2020-01-19 17:37:24 +00:00
duncanspumpkin 28565b370d Fix clang format 2020-01-19 17:19:45 +00:00
duncanspumpkin a5ef8d6240 Rename rct_vehicle 2020-01-19 17:14:56 +00:00
duncanspumpkin 164acc85cc Rename sprites to newer style naming 2020-01-19 17:10:53 +00:00
Michael Steenbeek b1e8caa575
Merge pull request #10570 from tupaschoal/use-more-coords-6
Prefer CoordsXY* on more places
2020-01-19 18:06:20 +01:00
Gymnasiast af12421f2d
Apply fixes 2020-01-19 17:34:11 +01:00
Tulio Leao b7e9b36a27 Prefer std::array and COORDS defines on Map::CoordsDirectionDelta 2020-01-19 13:30:29 -03:00
Michael Steenbeek d798811c4a Make GetWaterHeight return big Z (#10579)
* Make GetWaterHeight return big Z

* Restore > 0 [ci skip]
2020-01-19 15:12:48 +00:00
Gymnasiast 0d09a645fc
Refactor map_get_footpath_element() and fix #10486 2019-12-31 10:08:36 +01:00
Michael Steenbeek 97b1c888b3 Also change gClipSelectionA/B in TestPaint (#10485) 2019-12-31 07:12:17 +00:00
Tulio Leao 06fb16ee88 Use CoordsXYZ for gMapSelectArrowPosition (#10442) 2019-12-30 16:51:35 +00:00
Michael Steenbeek 64f7cac6d6
Create getters for station height and start (#10453) 2019-12-27 15:57:40 +01:00
Michael Steenbeek 8ca0cf52a7
Replace more direct accesses to base/clearance Z with getter/setter (#10454) 2019-12-27 15:26:40 +01:00
Tulio Leao 0c2e5747b8 Clarify test coords conversions 2019-12-24 11:19:06 -03:00
Tulio Leao 6c998d7b4d Make Map::map_get_track_element_at() use CoordsXYZ 2019-12-24 11:19:03 -03:00
Gymnasiast 62fcbb07ca
Rename methods to GetBaseZ/GetClearanceZ 2019-12-23 20:08:37 +01:00
Gymnasiast 7d11858dbe
Create getter for GetBaseHeight()/GetClearanceHeight() 2019-12-23 20:05:24 +01:00
Tulio Leao a2c7ecc6e5 Make Map::map_get_first_element_at() use CoordsXY (#10413)
* Make Map::map_get_first_element_at() use CoordsXY

* Fix clang-format on ClearAction.hpp

* Prefer TileDIrectionDelta over hardcoded delta on RideConstruction

* Use named Direction constants

* Make Compat::map_get_first_element_at() use CoordsXY
2019-12-23 07:35:41 +00:00
duncanspumpkin b34defa907 Fix testpaint 2019-12-21 12:18:34 +00:00
Michael Steenbeek 6ede67d50a
Merge pull request #10371 from tupaschoal/coords-for-get-surface-element-at
Make map_get_surface_element_at only accept Coords objects
2019-12-19 13:24:17 +01:00
Tulio Leao 7e7b4029a9 Simplified conversions from TileCoordsXYZ to CoordsXY 2019-12-19 08:12:42 -03:00
Tulio Leao aea755bd70 Allow TileCoordsXYZD to generate CoordsXYZD equivalent 2019-12-19 00:11:26 -03:00
Tulio Leao 5c657bde9f Remove map_get_surface_element_at operating with TileCoordsXY 2019-12-18 23:47:17 -03:00
Tulio Leao 7c75db2b2d Make map_get_surface_element_at only accept Coords objects 2019-12-18 23:46:50 -03:00
Tulio Leao c71c4284d0 Make map entrance/exit fetching functions use only CoordsXY objects 2019-12-17 23:55:46 -03:00
Tulio Leao 03e7e29b21 Make map entrance/exit fetching functions use Coords objects 2019-12-14 12:13:09 -03:00
Matt 6dd00787f6
Add missing static keywords 2019-10-20 14:13:59 +02:00
Matt 3d7c06f4b3
Change fopen_s to fopen and use EXPECT_EQ for COMPARE_FIELD 2019-10-20 14:13:59 +02:00
Matt e6d520e371
Add missing include 2019-10-20 13:49:39 +02:00
Matt 8243c2b64e
Update CMakeLists.txt 2019-10-20 13:49:39 +02:00