(svn r18098) [0.7] -Backport from trunk:

- Fix: Some possible unwanted side effects if using some sorts of boolean expressions in DEBUG (r18070)
- Fix: Crash when an articulated RV is turning on a drive through road station that gets forcefully (bankrupt) removed [FS#3310] (r18049)
[0.7] -Prepare for 0.7.4-RC1
This commit is contained in:
rubidium
2009-11-15 15:31:17 +00:00
parent 49ac7c9338
commit c607e6cb37
8 changed files with 103 additions and 41 deletions
+9 -1
View File
@@ -1495,7 +1495,15 @@ CommandCost CmdBuildRoadStop(TileIndex tile, DoCommandFlag flags, uint32 p1, uin
static Vehicle *ClearRoadStopStatusEnum(Vehicle *v, void *)
{
if (v->type == VEH_ROAD) v->u.road.state &= RVSB_ROAD_STOP_TRACKDIR_MASK;
if (v->type == VEH_ROAD) {
/* Okay... we are a road vehicle on a drive through road stop.
* But that road stop has just been removed, so we need to make
* sure we are in a valid state... however, vehicles can also
* turn on road stop tiles, so only clear the 'road stop' state
* bits and only when the state was 'in road stop', otherwise
* we'll end up clearing the turn around bits. */
if (HasBit(v->u.road.state, RVS_IN_DT_ROAD_STOP)) v->u.road.state &= RVSB_ROAD_STOP_TRACKDIR_MASK;
}
return NULL;
}