Information
I have disabled all mods
YesRequired
Summary
public transport vehicle has "forever boarding" problemExpected Result
not having this "forever boarding" problemActual Result
there are "forever boarding" problemsSteps to reproduce
playing the game for sometime, it will appearsPlatform
SteamGame Version
1.17.1-f4Optional
Description
Hi, I have encounterd the "forever boarding" problem recently.Since I have some experiences in programming, so I try to find out why.
I understand that Vehicle class has a Info field, which has a GetAI() method returning the vehicle's AI,
which has a field m_passengerCapacity, this should be the max capacity of a public transport vehicle, let's call this "AI capacity".
Also the Vehicle class has a m_transferSize field, which is current passenger count, let's call it "vehicle passenger".
Also the Vehicle class has a m_citizenUnits field, this should be the first unit of the CitizenUnit chain.
Each CitizenUnit can contain at most 5 citizens(m_citizen0/m_citizen1 ...). Thus we can calculate the max "chain capacity".
Further more, we can check each citizen field in CitizenUnit, and get the "chain passenger" count.
If I understand right, I think the "chain capacity" should be greater than or equal to the "AI capacity".
And the "vehicle passenger" should be equal to the "chain passenger".
But I found something strange in the "forever boarding" vehicle(for example, a monorail train), which is combined by several Vehicle instances(carriages).
Some of the carriage vehicle has information that the "chain capacity" is less than "AI capacity",
and some other carriage vehicle has information that "vehicle passenger" is NOT equal to the "chain passenger".
I think this might be the reason causing the "forever boarding" problem.
So I call the ReleaseVehicle method of VehicleManager class, and release all the suspicious vehicles.
But after a small time, when I check again, there are new suspicious vehicles created.
Now I doubt if my understanding is right
And about the environment I testing with, I know MODs can have a lot influences.
So I removed all the MODs, except my testing code MOD, which do nothing but get information and release suspicious vehicles.
Please help me with this problem, If my understanding above is wrong, please correct me.
Thanks a lot.
Tags
Attachments
Upvote
0