diff options
author | rubidium <rubidium@openttd.org> | 2007-04-29 21:24:08 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-04-29 21:24:08 +0000 |
commit | 202009522c3075e26b675ed0408075b8663b0859 (patch) | |
tree | 776fa0d9e85c7423a43aaea0f6277b62b8acecf9 /src/disaster_cmd.cpp | |
parent | 95e48eacaca785dacdda7d601ae7060b00b1f719 (diff) | |
download | openttd-202009522c3075e26b675ed0408075b8663b0859.tar.xz |
(svn r9754) -Codechange: make classes for all vehicle types, so we can make nicer/better maintainable code, i.e. virtual methods instead of switches.
Diffstat (limited to 'src/disaster_cmd.cpp')
-rw-r--r-- | src/disaster_cmd.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/disaster_cmd.cpp b/src/disaster_cmd.cpp index 9368646de..c6cc16a05 100644 --- a/src/disaster_cmd.cpp +++ b/src/disaster_cmd.cpp @@ -121,7 +121,7 @@ static void DisasterVehicleUpdateImage(Vehicle *v) * and owned by nobody */ static void InitializeDisasterVehicle(Vehicle *v, int x, int y, byte z, Direction direction, byte subtype) { - v->type = VEH_DISASTER; + v = new (v) DisasterVehicle(); v->x_pos = x; v->y_pos = y; v->z_pos = z; |