(svn r24528) -Fix: [NewGRF] RandomAction 84 should interpret register 100 as signed.
This commit is contained in:
@@ -533,6 +533,22 @@ public:
|
||||
return v;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the vehicle at offset \a n of this vehicle chain.
|
||||
* @param n Offset from the current vehicle.
|
||||
* @return The new vehicle or NULL if the offset is out-of-bounds.
|
||||
*/
|
||||
inline const Vehicle *Move(int n) const
|
||||
{
|
||||
const Vehicle *v = this;
|
||||
if (n < 0) {
|
||||
for (int i = 0; i != n && v != NULL; i--) v = v->Previous();
|
||||
} else {
|
||||
for (int i = 0; i != n && v != NULL; i++) v = v->Next();
|
||||
}
|
||||
return v;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the first order of the vehicles order list.
|
||||
* @return first order of order list.
|
||||
|
||||
Reference in New Issue
Block a user