mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-17 21:25:40 +00:00
(svn r6496) -Codechange: removed direct map access in train_cmd.c (Rubidium)
This commit is contained in:
parent
ec48e0a72b
commit
f03975c251
@ -3107,12 +3107,12 @@ red_light: {
|
|||||||
* FIND_FIRST_BIT only handles 6 bits at a time. */
|
* FIND_FIRST_BIT only handles 6 bits at a time. */
|
||||||
i = FindFirstBit2x64(ts);
|
i = FindFirstBit2x64(ts);
|
||||||
|
|
||||||
if (!(_m[gp.new_tile].m3 & SignalAgainstTrackdir(i))) {
|
if (!HasSignalOnTrackdir(gp.new_tile, ReverseTrackdir(i))) {
|
||||||
v->cur_speed = 0;
|
v->cur_speed = 0;
|
||||||
v->subspeed = 0;
|
v->subspeed = 0;
|
||||||
v->progress = 255 - 100;
|
v->progress = 255 - 100;
|
||||||
if (++v->load_unload_time_rem < _patches.wait_oneway_signal * 20) return;
|
if (++v->load_unload_time_rem < _patches.wait_oneway_signal * 20) return;
|
||||||
} else if (_m[gp.new_tile].m3 & SignalAlongTrackdir(i)){
|
} else if (HasSignalOnTrackdir(gp.new_tile, i)){
|
||||||
v->cur_speed = 0;
|
v->cur_speed = 0;
|
||||||
v->subspeed = 0;
|
v->subspeed = 0;
|
||||||
v->progress = 255-10;
|
v->progress = 255-10;
|
||||||
@ -3316,7 +3316,7 @@ static bool TrainCheckIfLineEnds(Vehicle *v)
|
|||||||
// depot?
|
// depot?
|
||||||
/* XXX -- When enabled, this makes it possible to crash trains of others
|
/* XXX -- When enabled, this makes it possible to crash trains of others
|
||||||
(by building a depot right against a station) */
|
(by building a depot right against a station) */
|
||||||
/* if (IsTileType(tile, MP_RAILWAY) && (_m[tile].m5 & 0xFC) == 0xC0)
|
/* if (IsTileType(tile, MP_RAILWAY) && GetRailTileType(tile) == RAIL_TILE_DEPOT_WAYPOINT)
|
||||||
return true;*/
|
return true;*/
|
||||||
|
|
||||||
/* Determine the non-diagonal direction in which we will exit this tile */
|
/* Determine the non-diagonal direction in which we will exit this tile */
|
||||||
|
Loading…
Reference in New Issue
Block a user