filter out contacts when collision flags change to allow player to pass through door

This commit is contained in:
James Lambert 2023-11-28 20:54:06 -07:00
parent f117026287
commit 32f6972c80
2 changed files with 6 additions and 1 deletions

View file

@ -245,8 +245,8 @@ That will generate the rom at `/build/portal64.z64`
## Current New Feature TODO List ## Current New Feature TODO List
- [ ] test chamber 10 without jumping - [ ] test chamber 10 without jumping
- [ ] check if display list is long enough - [ ] check if display list is long enough
- [ ] check collider flags when filtering contacts
- [ ] pausing while glados is speaking can end her speech early - [ ] pausing while glados is speaking can end her speech early
- [x] check collider flags when filtering contacts
- [x] gun flicker between levels - [x] gun flicker between levels
- [x] fizzler player sound effect - [x] fizzler player sound effect
- [x] clear z buffer instead of partitioning it - [x] clear z buffer instead of partitioning it

View file

@ -25,6 +25,11 @@ struct ContactSolver gContactSolver;
void contactSolverCleanupManifold(struct ContactManifold* manifold) { void contactSolverCleanupManifold(struct ContactManifold* manifold) {
int writeIndex = 0; int writeIndex = 0;
if (!(manifold->shapeA->collisionLayers & manifold->shapeB->collisionLayers)) {
manifold->contactCount = 0;
return;
}
for (int readIndex = 0; readIndex < manifold->contactCount; ++readIndex) { for (int readIndex = 0; readIndex < manifold->contactCount; ++readIndex) {
struct ContactPoint* contactPoint = &manifold->contacts[readIndex]; struct ContactPoint* contactPoint = &manifold->contacts[readIndex];
struct Vector3 offset; struct Vector3 offset;