summaryrefslogtreecommitdiff
path: root/src/roadveh.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-02-02 21:56:56 +0000
committerrubidium <rubidium@openttd.org>2011-02-02 21:56:56 +0000
commit8118f745752b893c5c6088103bb3de53260d12f5 (patch)
treed77709391559b12b4c1282a60286c1c5cf777c98 /src/roadveh.h
parent54161949d1f02a39dfe68812acda81b12d6940e8 (diff)
downloadopenttd-8118f745752b893c5c6088103bb3de53260d12f5.tar.xz
(svn r21943) -Codechange: document and unmagicify some bits of road vehicle overtaking
Diffstat (limited to 'src/roadveh.h')
-rw-r--r--src/roadveh.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/roadveh.h b/src/roadveh.h
index f1ac00901..bc9453adc 100644
--- a/src/roadveh.h
+++ b/src/roadveh.h
@@ -52,6 +52,8 @@ enum RoadVehicleStates {
RVSB_IN_DT_ROAD_STOP = 1 << RVS_IN_DT_ROAD_STOP, ///< The vehicle is in a drive-through road stop
RVSB_IN_DT_ROAD_STOP_END = RVSB_IN_DT_ROAD_STOP + TRACKDIR_END,
+ RVSB_DRIVE_SIDE = 1 << RVS_DRIVE_SIDE, ///< The vehicle is at the opposite side of the road
+
RVSB_TRACKDIR_MASK = 0x0F, ///< The mask used to extract track dirs
RVSB_ROAD_STOP_TRACKDIR_MASK = 0x09 ///< Only bits 0 and 3 are used to encode the trackdir for road stops
};
@@ -83,8 +85,8 @@ struct RoadVehicle : public GroundVehicle<RoadVehicle, VEH_ROAD> {
byte state; ///< @see RoadVehicleStates
byte frame;
uint16 blocked_ctr;
- byte overtaking;
- byte overtaking_ctr;
+ byte overtaking; ///< Set to #RVSB_DRIVE_SIDE when overtaking, otherwise 0.
+ byte overtaking_ctr; ///< The length of the current overtake attempt.
uint16 crashed_ctr;
byte reverse_ctr;