Openrct2: Mechanics sometimes fall down from rides

Created on 13 Feb 2018  Â·  15Comments  Â·  Source: OpenRCT2/OpenRCT2


OS: Windows 10
Version: 0.1.2
Commit/Build: 3ea6a3e - Original bug


Sometimes, mechanics fall down from a ride. I first noticed this on my space base park, which has paths which are all above ground level. Sometimes a mechanic would get stuck down in a building with no way to get up. Later on when i made a park that was competely suspended above water, i sometimes noticed a mechanic drowning for no reason.

I decided to make a test park with many rides above water, and 50 mechanics. After fastforwarding for 22 years, i only had about 30 mechanics left.

This behaviour is also present in vanilla RCT2.

  • [x] Reproducible in RCT2 (vanilla)?
  • [x] Multiplayer?

Steps to reproduce:

  1. Open my test park which is completely above water
  2. Fastforward for a few years
  3. Watch the amount of mechanics slowly decline as they drown

Screenshots / Video:
image
In above screenshot, i fastforwarded for many years. I started with 50 mechanics. The handymen and guests do not drown.

Save game:
___Mechanictest.zip

bug

Most helpful comment

I guess even mechanics get dizzy sometimes… :wink:

All 15 comments

I guess even mechanics get dizzy sometimes… :wink:

Just to clarify, I haven't caught a mechanic in the act of falling down yet, so i don't know when exactly it happens. It's one of those rare things you find out when it has already happened.

I tested this along with Deurklink and in further tests I found out that in a certain save file, the same mechanic drowns at the same time every time I load the game. In the save file I attached mechanic 28 will drown on the 8th of may, right when he walks out of the station's side of an exit to start an inspection.

Mechanic drowning.zip

Tagging @zaxcav, our resident pathfinding expert. 😃

The pathfinding logic is only responsible for getting the mechanic to the ride exit. I don't know how it works after that - i.e. what is responsible for walking the peep through the ride exit and onto the station platform.

I dug into the code enough to find where the mechanic falls, and the culprit in this case is the following lines in function peep_update_heading_to_inspect() (in Peep.cpp):

if (ride->mechanic_status != RIDE_MECHANIC_STATUS_HEADING || !(ride->lifecycle_flags & RIDE_LIFECYCLE_DUE_INSPECTION))
    {
        peep_decrement_num_riders(peep);
        peep->state = PEEP_STATE_FALLING;
        peep_window_state_update(peep);
        return;
    }

I.e. the game no longer thinks the ride is due for inspection, and the "resolution" in this case (and other checks prior to this) is to set the peep to falling. I believe that the prior checks cover cases such as the ride/exit is deleted from under the peep, in which case falling makes sense. In this case though, with the ride still there and water under the exit, it's fatal.
Other questions: Why is the ride no loner due for inspection? Overflow error somewhere?

@Gymnasiast Could you add Original bug label?

I've dug a little deeper, and the function ride_prepare_breakdown() in Ride.cpp is responsible for clearing the RIDE_LIFECYCLE_DUE_INSPECTION flag when the ride is about to breakdown.
In my opinion, if a mechanic happens to inspect a ride when it's about to breakdown, we are lucky and should let the mechanic inspection fix the problem before the ride actually breaks down.
Expanding the guard in Peep.cpp to deal with this case is trivial, however would still have the mechanic fall when attempting an inspection when no inspection is due and no breakdown is pending. Is this possible?
Other thoughts about how to fix this?
Would others be happy with this fix?

The ride that the mechanic drowned at in my linked save file breaks down 3 days after the mech drowns. With another drowning, the ride broke down on the same day as the drowning, so I can confirm that this happens in the games.

@zaxcav setting peep to falling is just telling it to recalculate what its doing. Its the basic state all peeps are put into after anything happens. They will fall until they hit the ground which most of the time is the next frame. Its possible that something has the z coordinate of the exit at the wrong height though and that is getting passed to the mechanic.

@duncanspumpkin What does "ground" here mean?
The peeps are currently falling through the "floor" of the ride exit.
Is that the real bug here?

Ground is any path or surface element. I see these are floating so it's perhaps getting the x and y coordinates wrong

Correct me if I'm wrong, but a ride exit is neither a path nor surface element, so falling through the "floor" is expected for a ride exit.
The first surface at the x,y in the sample save game is the lake bed.

Yes that's why i think it will be something messing up the leaving of the exit. There is some code that performs the walk through the exit. That may be failing for whatever reason.

In my opinion, if a mechanic happens to inspect a ride when it's about to breakdown, we are lucky and should let the mechanic inspection fix the problem before the ride actually breaks down.

I agree.

I think this one should be reopened. I just tried the test park from the first post, and while it is a lot less frequent now, mechanics still drown sometimes. (1 per year, on average)

Was this page helpful?
0 / 5 - 0 ratings