mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-10 08:00:05 +00:00
(svn r24527) -Add: [NewGRF] Allow resolving var 5F via vehicle var 61.
This commit is contained in:
parent
ce9019639d
commit
e37e2d92a6
@ -645,8 +645,13 @@ static uint32 VehicleGetVariable(Vehicle *v, const ResolverObject *object, byte
|
||||
Vehicle *u = v->Move((int32)GetRegister(0x10F));
|
||||
if (u == NULL) return 0;
|
||||
|
||||
if (parameter == 0x5F) {
|
||||
/* This seems to be the only variable that makes sense to access via var 61, but is not handled by VehicleGetVariable */
|
||||
return (u->random_bits << 8) | u->waiting_triggers;
|
||||
} else {
|
||||
return VehicleGetVariable(u, object, parameter, GetRegister(0x10E), available);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
||||
case 0x62: { // Curvature/position difference for n-th vehicle in chain [signed number relative to vehicle]
|
||||
|
Loading…
Reference in New Issue
Block a user