From 0def47a3b00b74157483ff73090e57d62e9f913d Mon Sep 17 00:00:00 2001 From: rubidium Date: Sun, 29 Apr 2007 21:24:08 +0000 Subject: (svn r9754) -Codechange: make classes for all vehicle types, so we can make nicer/better maintainable code, i.e. virtual methods instead of switches. --- src/disaster_cmd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/disaster_cmd.cpp') 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; -- cgit v1.2.3-70-g09d2