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
commitad2eef0a30832e41dad0e50c96aa364de3732511 (patch)
treed3f3e4b5c205c4a1d8156cbf146d05b01db0adf6 /newgrf.c
parent3f3cbea5c49ccf0293d22066ed810b6daf8b9a54 (diff)
downloadopenttd-ad2eef0a30832e41dad0e50c96aa364de3732511.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 */