| 766 | |
| 767 | template <typename T> |
| 768 | static bool MakeWayCollideEvent(int x, int y, const Game_Character& self, T& other, bool self_conflict) { |
| 769 | if (&self == &other) { |
| 770 | return false; |
| 771 | } |
| 772 | |
| 773 | if (!other.IsInPosition(x, y)) { |
| 774 | return false; |
| 775 | } |
| 776 | |
| 777 | // Force the other event to update, allowing them to possibly move out of the way. |
| 778 | MakeWayUpdate(other); |
| 779 | |
| 780 | if (!other.IsInPosition(x, y)) { |
| 781 | return false; |
| 782 | } |
| 783 | |
| 784 | return WouldCollide(self, other, self_conflict); |
| 785 | } |
| 786 | |
| 787 | static Game_Vehicle::Type GetCollisionVehicleType(const Game_Character* ch) { |
| 788 | if (ch && ch->GetType() == Game_Character::Vehicle) { |
no test coverage detected