| 713 | } |
| 714 | |
| 715 | static bool WouldCollide(const Game_Character& self, const Game_Character& other, bool self_conflict) { |
| 716 | if (self.GetThrough() || other.GetThrough()) { |
| 717 | return false; |
| 718 | } |
| 719 | |
| 720 | if (self.IsFlying() || other.IsFlying()) { |
| 721 | return false; |
| 722 | } |
| 723 | |
| 724 | if (!self.IsActive() || !other.IsActive()) { |
| 725 | return false; |
| 726 | } |
| 727 | |
| 728 | if (self.GetType() == Game_Character::Event |
| 729 | && other.GetType() == Game_Character::Event |
| 730 | && (self.IsOverlapForbidden() || other.IsOverlapForbidden())) { |
| 731 | return true; |
| 732 | } |
| 733 | |
| 734 | if (other.GetLayer() == lcf::rpg::EventPage::Layers_same && self_conflict) { |
| 735 | return true; |
| 736 | } |
| 737 | |
| 738 | if (self.GetLayer() == other.GetLayer()) { |
| 739 | return true; |
| 740 | } |
| 741 | |
| 742 | return false; |
| 743 | } |
| 744 | |
| 745 | template <typename T> |
| 746 | static void MakeWayUpdate(T& other) { |
no test coverage detected