diff options
author | hackykid <hackykid@openttd.org> | 2005-06-06 00:19:24 +0000 |
---|---|---|
committer | hackykid <hackykid@openttd.org> | 2005-06-06 00:19:24 +0000 |
commit | 1018d3b78670be09d0d6ffbb2633b715c0203146 (patch) | |
tree | 953354be89e9773360834c65363da6c96c051d79 /engine.c | |
parent | 09aadafda1dfb08780fade5a52289a0742f84674 (diff) | |
download | openttd-1018d3b78670be09d0d6ffbb2633b715c0203146.tar.xz |
(svn r2414) - Feature: [newgrf] Implement powered wagons, and the callback that goes with it.
Diffstat (limited to 'engine.c')
-rw-r--r-- | engine.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -589,6 +589,16 @@ int GetCustomEngineSprite(byte engine, const Vehicle *v, byte direction) } /** + * Check if a wagon is currently using a wagon override + * @param v The wagon to check + * @return true if it is using an override, false otherwise + */ +bool UsesWagonOverride(const Vehicle *v) { + assert(v->type == VEH_Train); + return (GetWagonOverrideSpriteSet(v->engine_type, v->u.rail.first_engine) != NULL); +} + +/** * Evaluates a newgrf callback * @param callback_info info about which callback to evaluate * (bit 0-7) = CallBack id of the callback to use, see CallBackId enum |