MCPcopy Create free account
hub / github.com/deathkiller/jazz2-native / OnCollisionQuery

Method OnCollisionQuery

Sources/Jazz2/LevelHandler.cpp:991–1000  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

989 Function<bool(Actors::ActorBase*)>& Callback;
990
991 bool OnCollisionQuery(std::int32_t nodeId) {
992 Actors::ActorBase* actor = (Actors::ActorBase*)Handler->_collisions.GetUserData(nodeId);
993 if (Self == actor || (actor->GetState() & (Actors::ActorState::CollideWithOtherActors | Actors::ActorState::IsDestroyed)) != Actors::ActorState::CollideWithOtherActors) {
994 return true;
995 }
996 if (actor->IsCollidingWith(AABB)) {
997 return Callback(actor);
998 }
999 return true;
1000 }
1001 };
1002
1003 QueryHelper helper = { this, self, aabb, callback };

Callers

nothing calls this directly

Calls 3

IsCollidingWithMethod · 0.80
GetUserDataMethod · 0.45
GetStateMethod · 0.45

Tested by

no test coverage detected