(svn r16505) -Fix [FS#2951] (r16472): since g++ 4.4 the implicit (default) constructor will zero the whole class. This caused all vehicle indices to be 0, which causes all kinds of trouble.
This commit is contained in:
@@ -584,6 +584,8 @@ struct DisasterVehicle : public SpecializedVehicle<DisasterVehicle, VEH_DISASTER
|
||||
uint16 image_override;
|
||||
VehicleID big_ufo_destroyer_target;
|
||||
|
||||
/** We don't want GCC to zero our struct! It already is zeroed and has an index! */
|
||||
DisasterVehicle() : SpecializedVehicle<DisasterVehicle, VEH_DISASTER>() {}
|
||||
/** We want to 'destruct' the right class. */
|
||||
virtual ~DisasterVehicle() {}
|
||||
|
||||
|
Reference in New Issue
Block a user