Skip to content

Commit

Permalink
Remove wrong assert and fix typo in comments
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielChappuis committed Feb 23, 2022
1 parent 4bbbaa7 commit 185d522
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion include/reactphysics3d/components/Components.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ RP3D_FORCE_INLINE bool Components::hasComponent(Entity entity) const {
return mMapEntityToComponentIndex.containsKey(entity);
}

// Return true if there is a component for a given entiy and if so set the entity index
// Return true if there is a component for a given entity and if so set the entity index
RP3D_FORCE_INLINE bool Components::hasComponentGetIndex(Entity entity, uint32& entityIndex) const {

auto it = mMapEntityToComponentIndex.find(entity);
Expand Down
4 changes: 1 addition & 3 deletions src/systems/CollisionDetectionSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ void CollisionDetectionSystem::addContactPairsToBodies() {
mRigidBodyComponents.addContacPair(contactPair.body2Entity, p);
}

// If at least of body is a CollisionBody
// If at least one of the two bodies is a CollisionBody
if (!isBody1Rigid || !isBody2Rigid) {

// Add the pair index to the array of pairs with CollisionBody
Expand Down Expand Up @@ -858,8 +858,6 @@ void CollisionDetectionSystem::createContacts() {
// creation (only the pairs with two RigidBodies are added during island creation)
mWorld->mProcessContactPairsOrderIslands.addRange(mCollisionBodyContactPairsIndices);

assert(mWorld->mProcessContactPairsOrderIslands.size() == (*mCurrentContactPairs).size());

// Process the contact pairs in the order defined by the islands such that the contact manifolds and
// contact points of a given island are packed together in the array of manifolds and contact points
const uint32 nbContactPairsToProcess = static_cast<uint32>(mWorld->mProcessContactPairsOrderIslands.size());
Expand Down

0 comments on commit 185d522

Please sign in to comment.