mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 19:49:19 +02:00
build 200430. vehicle lookup fix
This commit is contained in:
2
DynObj.h
2
DynObj.h
@@ -772,7 +772,7 @@ TDynamicObject::find_vehicle( coupling const Coupling, Predicate_ const Predicat
|
|||||||
return vehicle; } }
|
return vehicle; } }
|
||||||
// if we didn't yet find a suitable vehicle try in the other direction
|
// if we didn't yet find a suitable vehicle try in the other direction
|
||||||
vehicle = this;
|
vehicle = this;
|
||||||
while( ( vehicle = vehicle->NextC( Coupling ) ) != nullptr ) {
|
while( ( vehicle = vehicle->PrevC( Coupling ) ) != nullptr ) {
|
||||||
if( Predicate( vehicle ) ) {
|
if( Predicate( vehicle ) ) {
|
||||||
return vehicle; } }
|
return vehicle; } }
|
||||||
// if we still don't have a match give up
|
// if we still don't have a match give up
|
||||||
|
|||||||
Reference in New Issue
Block a user