locomotive true;
function 0 "light";
function 3 "sfx";
+ function 5 "whstl";
length 180;
width 35;
axle { position -18.5; wheel_diameter 14; powered true; object "bre41-axle.object"; };
};
};
+
+vehicle \37574-01
+{
+ name "BR E 03";
+ locomotive true;
+ function 0 "light";
+ function 2 "sfx";
+ function 3 "whstl";
+ swap_direction true;
+
+ length 219;
+ width 35;
+ height 49;
+
+ // XXX Create proper 3D model for this
+ object "br185-body.object";
+
+ bogie
+ {
+ position 62;
+ axle { position 17; wheel_diameter 14; powered true; };
+ axle { position -8.5; wheel_diameter 14; powered true; };
+ axle { position -34; wheel_diameter 14; powered true; };
+ };
+
+ bogie
+ {
+ position -62;
+ axle { position 34; wheel_diameter 14; powered true; };
+ axle { position 8.5; wheel_diameter 14; powered true; };
+ axle { position -17; wheel_diameter 14; powered true; };
+ };
+};
if(controller->get_reverse()!=reverse)
{
reverse = controller->get_reverse();
- driver.set_loco_reverse(address, reverse);
+ bool r = reverse;
+ if(loco_type.get_swap_direction())
+ r = !r;
+ driver.set_loco_reverse(address, r);
release_blocks(cur_blocks_end, blocks.end());
reverse_blocks(blocks);
if(addr==address)
{
current_speed_step = speed;
- if(rev!=reverse)
- layout.get_driver().set_loco_reverse(address, reverse);
+ bool r = reverse;
+ if(loco_type.get_swap_direction())
+ r = !r;
+ if(rev!=r)
+ layout.get_driver().set_loco_reverse(address, r);
speed_changing = false;
pure_speed = false;
}
VehicleType::VehicleType(const ArticleNumber &an):
art_nr(an),
locomotive(false),
+ swap_direction(false),
length(0),
width(0),
height(0)
add("name", &VehicleType::name);
add("object", &VehicleType::object);
add("rod", &Loader::rod);
+ add("swap_direction", &VehicleType::swap_direction);
add("width", &Loader::width);
}
std::string name;
bool locomotive;
std::map<unsigned, std::string> functions;
+ bool swap_direction;
float length;
float width;
float height;
bool is_locomotive() const { return locomotive; }
unsigned get_max_function() const;
const std::map<unsigned, std::string> &get_functions() const { return functions; }
+ bool get_swap_direction() const { return swap_direction; }
float get_length() const { return length; }
float get_width() const { return width; }
float get_height() const { return height; }