Changeset - r19596:02aa696edbd2
[Not reviewed]
master
0 1 0
frosch - 12 years ago 2012-09-16 16:29:48
frosch@openttd.org
(svn r24527) -Add: [NewGRF] Allow resolving var 5F via vehicle var 61.
1 file changed with 6 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/newgrf_engine.cpp
Show inline comments
 
@@ -645,7 +645,12 @@ static uint32 VehicleGetVariable(Vehicle
 
				Vehicle *u = v->Move((int32)GetRegister(0x10F));
 
				if (u == NULL) return 0;
 

	
 
				return VehicleGetVariable(u, object, parameter, GetRegister(0x10E), available);
 
				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;
 

	
0 comments (0 inline, 0 general)