mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-04-28 15:57:59 +03:00
Fixed infinite loop if bridges with zero thickness exist in level
This commit is contained in:
parent
dad63f98c5
commit
88bbe48621
2 changed files with 8 additions and 2 deletions
|
@ -72,7 +72,7 @@ TombEngine releases are located in this repository (alongside with Tomb Editor):
|
|||
* Fixed incorrect behaviour of Logic.EnableEvent() and Logic.DisableEvent() functions.
|
||||
* Fixed Util.HasLineOfSight() not taking static meshes into consideration.
|
||||
* Fixed collision callbacks not properly clearing after leveljump.
|
||||
* Fixed Flow.SetIntroImagePath() not using the correct path
|
||||
* Fixed Flow.SetIntroImagePath() not using the correct path.
|
||||
|
||||
## [Version 1.5](https://github.com/TombEngine/TombEditorReleases/releases/tag/v1.7.2) - 2024-11-03
|
||||
|
||||
|
|
|
@ -543,8 +543,14 @@ namespace TEN::Collision::Floordata
|
|||
auto* sector = ¤tSector;
|
||||
do
|
||||
{
|
||||
// For bridges with zero thickness (which is incorrect setup, but still possible), break out of
|
||||
// infinite loop caused by infinite traversal over the same height value.
|
||||
int nextPos = sector->GetBridgeSurfaceHeight(pos, !isBottom);
|
||||
if (nextPos = pos.y)
|
||||
nextPos += (isBottom ? 1 : -1);
|
||||
|
||||
// Set vertical position to lowest bridge ceiling height or highest bridge floor height.
|
||||
pos.y = sector->GetBridgeSurfaceHeight(pos, !isBottom);
|
||||
pos.y = nextPos;
|
||||
|
||||
// Find sector at lowest bridge floor height or highest bridge ceiling height.
|
||||
while (isBottom ?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue