diff options
author | peter1138 <peter1138@openttd.org> | 2006-05-19 10:04:03 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2006-05-19 10:04:03 +0000 |
commit | cd6ab6178c7daf0aa1c00eda66671f57fc1f73fd (patch) | |
tree | 5849b8eacb3c8960384d3879be8a7f077b13182d /train_cmd.c | |
parent | 62dbc3674138aeaa2da4883e4e45cc77222da794 (diff) | |
download | openttd-cd6ab6178c7daf0aa1c00eda66671f57fc1f73fd.tar.xz |
(svn r4910) - NewGRF: add and initialize cargo subtype for vehicle visual variations
Diffstat (limited to 'train_cmd.c')
-rw-r--r-- | train_cmd.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/train_cmd.c b/train_cmd.c index bf6996ccc..1810d5925 100644 --- a/train_cmd.c +++ b/train_cmd.c @@ -535,6 +535,7 @@ static void AddArticulatedParts(const RailVehicleInfo *rvi, Vehicle **vl) u->spritenum = rvi_artic->image_index; if (flip_image) u->spritenum++; u->cargo_type = rvi_artic->cargo_type; + u->cargo_subtype = 0; u->cargo_cap = rvi_artic->capacity; u->max_speed = 0; u->max_age = 0; @@ -616,6 +617,7 @@ static int32 CmdBuildRailWagon(EngineID engine, TileIndex tile, uint32 flags) } v->cargo_type = rvi->cargo_type; + v->cargo_subtype = 0; v->cargo_cap = rvi->capacity; v->value = value; // v->day_counter = 0; @@ -681,6 +683,7 @@ static void AddRearEngineToMultiheadedTrain(Vehicle* v, Vehicle* u, bool buildin SetMultiheaded(u); u->spritenum = v->spritenum + 1; u->cargo_type = v->cargo_type; + u->cargo_subtype = v->cargo_subtype; u->cargo_cap = v->cargo_cap; u->u.rail.railtype = v->u.rail.railtype; if (building) v->next = u; @@ -763,6 +766,7 @@ int32 CmdBuildRailVehicle(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) v->vehstatus = VS_HIDDEN | VS_STOPPED | VS_DEFPAL; v->spritenum = rvi->image_index; v->cargo_type = rvi->cargo_type; + v->cargo_subtype = 0; v->cargo_cap = rvi->capacity; v->max_speed = rvi->max_speed; v->value = value; |