Fix hole opening bug
This commit is contained in:
parent
589bc4a9fb
commit
66faa76851
|
@ -491,7 +491,7 @@ int portalSurfaceCutNewHole(struct Portal* portal, int portalIndex) {
|
|||
|
||||
void portalCheckForHoles(struct Portal* portals) {
|
||||
if ((portals[1].flags & PortalFlagsNeedsNewHole) != 0 || (
|
||||
portals[0].portalSurfaceIndex == portals[1].portalSurfaceIndex && (portals[0].flags & PortalFlagsNeedsNewHole) != 0
|
||||
portalSurfaceAreBothOnSameSurface() && (portals[0].flags & PortalFlagsNeedsNewHole) != 0
|
||||
)) {
|
||||
portalSurfaceRevert(1);
|
||||
portals[1].flags |= PortalFlagsNeedsNewHole;
|
||||
|
|
|
@ -292,6 +292,7 @@ int sceneOpenPortal(struct Scene* scene, struct Transform* at, int portalIndex,
|
|||
|
||||
portal->transform = *at;
|
||||
portal->roomIndex = roomIndex;
|
||||
portal->scale = 0.0f;
|
||||
gCollisionScene.portalTransforms[portalIndex] = &portal->transform;
|
||||
gCollisionScene.portalRooms[portalIndex] = roomIndex;
|
||||
|
||||
|
@ -300,8 +301,6 @@ int sceneOpenPortal(struct Scene* scene, struct Transform* at, int portalIndex,
|
|||
portal->opacity = 0.0f;
|
||||
}
|
||||
|
||||
portal->scale = 0.0f;
|
||||
|
||||
contactSolverCheckPortalContacts(&gContactSolver, &gCurrentLevel->collisionQuads[quadIndex]);
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue