summaryrefslogtreecommitdiff
path: root/newgrf.c
diff options
context:
space:
mode:
authorhackykid <hackykid@openttd.org>2005-06-03 10:39:30 +0000
committerhackykid <hackykid@openttd.org>2005-06-03 10:39:30 +0000
commit52ebf02f2fa35447b7455b78bab060ede9916304 (patch)
treed3f3e4b5c205c4a1d8156cbf146d05b01db0adf6 /newgrf.c
parent6849e086f5a19094129e2b7b2046421fad571774 (diff)
downloadopenttd-52ebf02f2fa35447b7455b78bab060ede9916304.tar.xz
(svn r2401) - Fix: [newgrf] Finish up callback mechanism, implement 'refit capacity' callback slightly more correct.
Diffstat (limited to 'newgrf.c')
-rw-r--r--newgrf.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/newgrf.c b/newgrf.c
index 729594d36..445bd38e8 100644
--- a/newgrf.c
+++ b/newgrf.c
@@ -343,7 +343,12 @@ static bool RailVehicleChangeInfo(uint engine, int numinfo, int prop, byte **buf
_engine_refit_masks[engine + i] = refit_mask;
}
} break;
-
+ case 0x1E: /* Callback */
+ FOR_EACH_OBJECT {
+ byte callbacks = grf_load_byte(&buf);
+ rvi[i].callbackmask = callbacks;
+ }
+ break;
/* TODO */
/* Fall-through for unimplemented two bytes long properties. */
case 0x1B: /* Powered wagons power bonus */
@@ -353,7 +358,6 @@ static bool RailVehicleChangeInfo(uint engine, int numinfo, int prop, byte **buf
/* Fall-through for unimplemented one byte long properties. */
case 0x1A: /* Sort order */
case 0x1C: /* Refit cost */
- case 0x1E: /* Callback */
case 0x1F: /* Tractive effort */
case 0x20: /* Air drag */
case 0x21: /* Shorter tenders */