MCPcopy Create free account
hub / github.com/EasyRPG/Player / MakeWayCollideEvent

Function MakeWayCollideEvent

src/game_map.cpp:768–785  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

766
767template <typename T>
768static 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
787static Game_Vehicle::Type GetCollisionVehicleType(const Game_Character* ch) {
788 if (ch && ch->GetType() == Game_Character::Vehicle) {

Callers 1

CheckOrMakeWayExMethod · 0.85

Calls 3

MakeWayUpdateFunction · 0.85
WouldCollideFunction · 0.85
IsInPositionMethod · 0.45

Tested by

no test coverage detected