16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-18 22:39:18 +02:00

maintenance: minor code touch ups

This commit is contained in:
tmj-fstate
2017-11-01 02:54:31 +01:00
parent ffbaacdb0e
commit a700d36ea7
20 changed files with 53 additions and 46 deletions

View File

@@ -394,7 +394,7 @@ basic_cell::register_end( TTraction *Traction ) {
// find a vehicle located nearest to specified point, within specified radius, optionally ignoring vehicles without drivers. reurns: located vehicle and distance
std::tuple<TDynamicObject *, float>
basic_cell::find( glm::dvec3 const &Point, float const Radius, bool const Onlycontrolled, bool const Findbycoupler ) {
basic_cell::find( glm::dvec3 const &Point, float const Radius, bool const Onlycontrolled, bool const Findbycoupler ) const {
TDynamicObject *vehiclenearest { nullptr };
float leastdistance { std::numeric_limits<float>::max() };
@@ -429,7 +429,7 @@ basic_cell::find( glm::dvec3 const &Point, float const Radius, bool const Onlyco
// finds a path with one of its ends located in specified point. returns: located path and id of the matching endpoint
std::tuple<TTrack *, int>
basic_cell::find( glm::dvec3 const &Point, TTrack const *Exclude ) {
basic_cell::find( glm::dvec3 const &Point, TTrack const *Exclude ) const {
Math3D::vector3 point { Point.x, Point.y, Point.z }; // sad workaround until math classes unification
int endpointid;
@@ -449,7 +449,7 @@ basic_cell::find( glm::dvec3 const &Point, TTrack const *Exclude ) {
// finds a traction piece with one of its ends located in specified point. returns: located traction piece and id of the matching endpoint
std::tuple<TTraction *, int>
basic_cell::find( glm::dvec3 const &Point, TTraction const *Exclude ) {
basic_cell::find( glm::dvec3 const &Point, TTraction const *Exclude ) const {
int endpointid;
@@ -468,7 +468,7 @@ basic_cell::find( glm::dvec3 const &Point, TTraction const *Exclude ) {
// finds a traction piece located nearest to specified point, sharing section with specified other piece and powered in specified direction. returns: located traction piece
std::tuple<TTraction *, int, float>
basic_cell::find( glm::dvec3 const &Point, TTraction const *Other, int const Currentdirection ) {
basic_cell::find( glm::dvec3 const &Point, TTraction const *Other, int const Currentdirection ) const {
TTraction
*tractionnearest { nullptr };