From bc9c8db287a1e2f7f81f24f67373627c56a5c3dd Mon Sep 17 00:00:00 2001 From: frosch Date: Tue, 3 Jan 2012 23:53:53 +0000 Subject: [PATCH] (svn r23748) -Fix: Make vehicle variables A8 and A9 always return 0. Returning cur_image is a potential desyncer due to Action1 in static NewGRFs. --- src/newgrf_engine.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/newgrf_engine.cpp b/src/newgrf_engine.cpp index 87c3090063..980ee33f28 100644 --- a/src/newgrf_engine.cpp +++ b/src/newgrf_engine.cpp @@ -743,8 +743,8 @@ static uint32 VehicleGetVariable(Vehicle *v, const ResolverObject *object, byte case 0x1D: return GB(v->y_pos, 8, 8); case 0x1E: return v->z_pos; case 0x1F: return object->u.vehicle.info_view ? DIR_W : v->direction; - case 0x28: return v->cur_image; - case 0x29: return GB(v->cur_image, 8, 8); + case 0x28: return 0; // cur_image is a potential desyncer due to Action1 in static NewGRFs. + case 0x29: return 0; // cur_image is a potential desyncer due to Action1 in static NewGRFs. case 0x32: return v->vehstatus; case 0x33: return 0; // non-existent high byte of vehstatus case 0x34: return v->type == VEH_AIRCRAFT ? (v->cur_speed * 10) / 128 : v->cur_speed;