mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-16 00:12:51 +00:00
(svn r8400) -Fix
Simplify r8399
This commit is contained in:
parent
35de25eec1
commit
e85cd647e1
@ -1359,10 +1359,6 @@ int32 CmdBuildRoadStop(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
|
|||||||
if (st != NULL && st->facilities != 0) st = NULL;
|
if (st != NULL && st->facilities != 0) st = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If DC_EXEC is NOT set we still need to create the road stop to test if everything is OK.
|
|
||||||
* In this case we need to delete it before return. */
|
|
||||||
std::auto_ptr<RoadStop> rs_auto_delete;
|
|
||||||
|
|
||||||
//give us a road stop in the list, and check if something went wrong
|
//give us a road stop in the list, and check if something went wrong
|
||||||
road_stop = new RoadStop(tile);
|
road_stop = new RoadStop(tile);
|
||||||
if (road_stop == NULL) {
|
if (road_stop == NULL) {
|
||||||
@ -1370,7 +1366,7 @@ int32 CmdBuildRoadStop(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* ensure that in case of error (or no DC_EXEC) the new road stop gets deleted upon return */
|
/* ensure that in case of error (or no DC_EXEC) the new road stop gets deleted upon return */
|
||||||
rs_auto_delete = std::auto_ptr<RoadStop>(road_stop);
|
std::auto_ptr<RoadStop> rs_auto_delete(road_stop);
|
||||||
|
|
||||||
if (st != NULL &&
|
if (st != NULL &&
|
||||||
GetNumRoadStopsInStation(st, RS_BUS) + GetNumRoadStopsInStation(st, RS_TRUCK) >= ROAD_STOP_LIMIT) {
|
GetNumRoadStopsInStation(st, RS_BUS) + GetNumRoadStopsInStation(st, RS_TRUCK) >= ROAD_STOP_LIMIT) {
|
||||||
|
Loading…
Reference in New Issue
Block a user