From 00ba82750b9e680f41425b320cfc8097dc86d5f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=28=C2=B4=E3=83=BB=CF=89=E3=83=BB=EF=BD=80=29?= Date: Thu, 20 Jan 2022 15:12:59 +0900 Subject: [PATCH] translate ist_weg_frei to can_enter_tile --- vehicle/movingobj.h | 2 +- vehicle/simroadtraffic.cc | 12 ++++++------ vehicle/simroadtraffic.h | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/vehicle/movingobj.h b/vehicle/movingobj.h index b35914ea7..05e6e6418 100644 --- a/vehicle/movingobj.h +++ b/vehicle/movingobj.h @@ -58,7 +58,7 @@ class movingobj_t : public vehicle_base_t, public sync_steppable // always free virtual bool check_next_tile(const grund_t *) const; - virtual bool ist_weg_frei() { return 1; } + virtual bool can_enter_tile() { return 1; } grund_t* hop_check() OVERRIDE; void hop(grund_t* gr) OVERRIDE; waytype_t get_waytype() const OVERRIDE { return get_desc()->get_waytype(); } diff --git a/vehicle/simroadtraffic.cc b/vehicle/simroadtraffic.cc index ef5260c09..8147fd047 100644 --- a/vehicle/simroadtraffic.cc +++ b/vehicle/simroadtraffic.cc @@ -465,7 +465,7 @@ void private_car_t::rdwr(loadsave_t *file) } -bool private_car_t::ist_weg_frei(grund_t *gr) +bool private_car_t::can_enter_tile(grund_t *gr) { if(gr->get_top()>200) { // already too many things here @@ -685,7 +685,7 @@ grund_t* private_car_t::hop_check() // cul de sac: return if(ribi==0) { pos_next_next = get_pos(); - return ist_weg_frei(from) ? from : NULL; + return can_enter_tile(from) ? from : NULL; } #ifdef DESTINATION_CITYCARS @@ -726,7 +726,7 @@ grund_t* private_car_t::hop_check() #else // ok, now check if we are allowed to go here (i.e. no cars blocking) pos_next_next = to->get_pos(); - if(ist_weg_frei(from)) { + if(can_enter_tile(from)) { // ok, this direction is fine! ms_traffic_jam = 0; if(current_speed<48) { @@ -752,7 +752,7 @@ grund_t* private_car_t::hop_check() else { pos_next_next = get_pos(); } - if(ist_weg_frei(from)) { + if(can_enter_tile(from)) { // ok, this direction is fine! ms_traffic_jam = 0; if(current_speed<48) { @@ -764,12 +764,12 @@ grund_t* private_car_t::hop_check() // only stumps at single way crossing, all other blocked => turn around if(ribi==0) { pos_next_next = get_pos(); - return ist_weg_frei(from) ? from : NULL; + return can_enter_tile(from) ? from : NULL; } #endif } else { - if(from && ist_weg_frei(from)) { + if(from && can_enter_tile(from)) { // ok, this direction is fine! ms_traffic_jam = 0; if(current_speed<48) { diff --git a/vehicle/simroadtraffic.h b/vehicle/simroadtraffic.h index 5c7eb241e..d72915ccb 100644 --- a/vehicle/simroadtraffic.h +++ b/vehicle/simroadtraffic.h @@ -116,7 +116,7 @@ class private_car_t : public road_user_t, public overtaker_t sync_result sync_step(uint32 delta_t) OVERRIDE; void hop(grund_t *gr) OVERRIDE; - bool ist_weg_frei(grund_t *gr); + bool can_enter_tile(grund_t *gr); void enter_tile(grund_t* gr) OVERRIDE;