OpenRCT2/src
Richard Fine a1222fa4ca
Staff code cleanup (#12907)
* Make UpdateFixing*() methods use const where possible

To make it clearer which steps actually modify the ride being fixed and which do not, pass const Ride* instead of Ride* where possible.

* Extract maximum litter search distance to a constant

* Make peep_update_*() methods return bool

* Use Direction type and helpers where applicable

* Const correctness and other cleanup

Make many functions take a const Peep* / const Staff* to clarify that they do not modify the peep being passed in. Also use the Direction type for some return values, and simplify staff_is_location_on_patrol_edge.

* Use clearer expression of constant value

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>

* Convert staff functions to members

* Remove AsStaff const overload

* Use As<Staff>() instead of static_cast

* Simplify direction selection code

* Clean up use of magic constants

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
2020-09-27 21:07:09 -03:00
..
openrct2 Staff code cleanup (#12907) 2020-09-27 21:07:09 -03:00
openrct2-android Release v0.3.1 2020-09-27 17:57:34 -03:00
openrct2-cli Update copyright year to 2020 2020-07-21 15:04:34 +02:00
openrct2-ui Fix #12969: Crash opening ride window with invalid mechanic assigned 2020-09-27 13:40:40 +03:00
openrct2-win Include missing headers 2020-08-05 16:29:29 +02:00
thirdparty Improve dukglue's includes 2020-04-26 14:35:08 +01:00