Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bad assert checking train at station #747

Closed
DorpsGek opened this issue Apr 24, 2007 · 1 comment
Closed

bad assert checking train at station #747

DorpsGek opened this issue Apr 24, 2007 · 1 comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

Phazorx opened the ticket and wrote:

r9712

sending to depot reversed loading train that is longer than station causes:
openttd: /home/ottdcoop/svn-sandbox/src/vehicle.cpp:2936: void Vehicle::LeaveStation(): Assertion `IsTileType(tile, MP_STATION) || type == VEH_SHIP' failed.

logic problem, trainhead after reversing is not on station tile anymore and fails that check.

recommendation: replace "train at station" criteria to either loading or unloading

void Vehicle::LeaveStation()
{
assert(current_order.type == OT_LOADING);
current_order.type = OT_LEAVESTATION;
current_order.flags = 0;
GetStation(this->last_station_visited)->loading_vehicles.remove(this);
}

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/747
@DorpsGek
Copy link
Member Author

peter1138 closed the ticket.

Reason for closing: Fixed


This comment was imported from FlySpray: https://bugs.openttd.org/task/747

@DorpsGek DorpsGek added flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) Vehicles labels Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant