(svn r9754) -Codechange: make classes for all vehicle types, so we can make nicer/better maintainable code, i.e. virtual methods instead of switches.

This commit is contained in:
rubidium
2007-04-29 21:24:08 +00:00
parent 5eb076402f
commit 0def47a3b0
12 changed files with 245 additions and 55 deletions

View File

@@ -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;