equal
deleted
inserted
replaced
98 do { |
98 do { |
99 const RailVehicleInfo *rvi = RailVehInfo(u->engine_type); |
99 const RailVehicleInfo *rvi = RailVehInfo(u->engine_type); |
100 uint mass = rvi->weight + ((_cargoc.weights[u->cargo_type] * u->cargo_count) >> 4); |
100 uint mass = rvi->weight + ((_cargoc.weights[u->cargo_type] * u->cargo_count) >> 4); |
101 if (rvi->power) emass += mass; |
101 if (rvi->power) emass += mass; |
102 |
102 |
103 if (HASBIT(u->u.rail.flags, VRF_GOINGUP)) { |
103 if (!IsTileType(u->tile, MP_TUNNELBRIDGE)) { |
104 f += (float)mass * ( -F_GRAV * F_THETA); |
104 if (HASBIT(u->u.rail.flags, VRF_GOINGUP)) { |
105 } else if (HASBIT(u->u.rail.flags, VRF_GOINGDOWN)) { |
105 f += (float)mass * ( -F_GRAV * F_THETA); |
106 f += (float)mass * ( F_GRAV * F_THETA); |
106 } else if (HASBIT(u->u.rail.flags, VRF_GOINGDOWN)) { |
|
107 f += (float)mass * ( F_GRAV * F_THETA); |
|
108 } |
107 } |
109 } |
108 |
110 |
109 // compute curve penalty.. |
111 // compute curve penalty.. |
110 if (u->next != NULL) { |
112 if (u->next != NULL) { |
111 uint diff = (u->direction - u->next->direction) & 7; |
113 uint diff = (u->direction - u->next->direction) & 7; |