@@ -726,13 +726,12 @@ static bool WouldCollide(const Game_Character& self, const T& other, bool self_c
726726 if (self.GetLayer () == other.GetLayer ()) {
727727 if constexpr (impl == Game_Map::eImpl_AssertWayBackground) {
728728 // check if 'self' is blocked by player
729- // if the blocked movement doesn't occur in foreground
730- // context, then they could just walk away
729+ // ( if the blocked movement doesn't occur inside
730+ // 'foreground' context, then they might just walk away)
731731
732732 if (other.GetType () == Game_Character::Player) {
733733 return false ;
734734 }
735- // TODO: should maybe check if offscreen
736735 if (other.GetType () == Game_Character::Vehicle) {
737736 return false ;
738737 }
@@ -762,26 +761,25 @@ static bool WouldCollide(const Game_Character& self, const T& other, bool self_c
762761 auto * page = reinterpret_cast <Game_Event const &>(other).GetActivePage ();
763762 auto move_type = page ? page->move_type : 0 ;
764763
765- // TODO: only when !main_flag
766764 if (move_type == lcf::rpg::EventPage::MoveType_vertical) {
767- // check if other event culd still move up/down...
765+ // check if ' other' event could still move up/down...
768766 if (Game_Map::CheckWay (other, other.GetX (), other.GetY (), other.GetX (), other.GetY () + other.GetDyFromDirection (Game_Character::Up), true , &ignore_list)
769767 || Game_Map::CheckWay (other, other.GetX (), other.GetY (), other.GetX (), other.GetY () + other.GetDyFromDirection (Game_Character::Down), true , &ignore_list)) {
770768 return false ;
771769 }
772770 } else if (move_type == lcf::rpg::EventPage::MoveType_horizontal) {
773- // check if other event culd still move left/right...
771+ // check if ' other' event could still move left/right...
774772 if (Game_Map::CheckWay (other, other.GetX (), other.GetY (), other.GetX () + other.GetDxFromDirection (Game_Character::Left), other.GetY (), true , &ignore_list)
775773 || Game_Map::CheckWay (other, other.GetX (), other.GetY (), other.GetX () + other.GetDxFromDirection (Game_Character::Right), other.GetY (), true , &ignore_list)) {
776774 return false ;
777775 }
778776 } else if (std::any_of (rng_moves.begin (), rng_moves.end (), [&move_type](auto mt) { return move_type == mt; })) {
779- // check if other event culd still move in any direction...
777+ // check if ' other' event could still move in any direction...
780778 if (check_rng_move (other, &ignore_list)) {
781779 return false ;
782780 }
783781 } else if (move_type == lcf::rpg::EventPage::MoveType_custom) {
784- // check if other events custom route would make it possible for this event to move...
782+ // check if the other event's custom route would make it possible for this event to move...
785783 do_check_next_move_command = true ;
786784 }
787785 }
0 commit comments