Turn assertion in idRenderWorldLocal::BoundsInAreas() into Warning

apparently this happens sometimes, but not often enough to reproduce
properly?

also some small changes (mostly formatting) to Configuration.md

refs #540
This commit is contained in:
Daniel Gibson 2024-02-03 15:43:59 +01:00
parent 94a208ea18
commit e63b63fcff
2 changed files with 12 additions and 4 deletions

View file

@ -41,13 +41,14 @@ Some notes:
directions of one stick to use it to look around or aim.
- Similarly, you need to bind *Forward*, *Backpedal*, *Move Left* and *Move Right* to the
corresponding directions of a stick to use it for player movement.
* The "Start" button ("+" on Nintendo gamepads, "Options" on Playstation 4/5 controllers) acts
- However, see below for configs with default bindings that you can load.
* The `Start` button (`+` on Nintendo gamepads, `Options` on Playstation 4/5 controllers) acts
like the Escape key, so it will **open/close the menu** and can not be bound.
The other buttons, axes and triggers can be bound to arbitrary actions in the Controls menu,
except for the Home button, which can't be used by dhewm3 at all (because it opens Steam when that is running).
* In **menus**, either stick will move the cursor, and the button you assign to *attack* (fire) acts
like the left mouse button, and so does the lower face button (A on XBox controllers, B on Nintendo
controllers, Cross on PS controllers) and the upper face button (Y on XBox, X on Nintendo, Triangle on PS).
like the left mouse button, and so does the lower face button (`A` on XBox controllers, `B` on Nintendo
controllers, `Cross` on PS controllers) and the upper face button (`Y` on XBox, `X` on Nintendo, `Triangle` on PS).
* The layout of the controller (XBox-like, Nintendo-like, Playstation-like) should be automatically
detected and is used to display the button names according to the layout. If yours isn't detected
correctly, you can overwrite it with the `joy_gamepadLayout` CVar.

View file

@ -975,7 +975,14 @@ int idRenderWorldLocal::BoundsInAreas( const idBounds &bounds, int *areas, int m
int numAreas = 0;
assert( areas );
assert( bounds[0][0] <= bounds[1][0] && bounds[0][1] <= bounds[1][1] && bounds[0][2] <= bounds[1][2] );
//assert( bounds[0][0] <= bounds[1][0] && bounds[0][1] <= bounds[1][1] && bounds[0][2] <= bounds[1][2] );
// DG: apparently this happens sometimes.. handle it more gracefully than an assertion.
if ( bounds[0][0] > bounds[1][0] || bounds[0][1] > bounds[1][1] || bounds[0][2] > bounds[1][2] ) {
common->Warning( "idRenderWorld::BoundsInAreas() called with invalid bounds: { { %f %f %f }, { %f %f %f } } !",
bounds[0][0], bounds[0][1], bounds[0][2], bounds[1][0], bounds[1][1], bounds[1][2] );
return numAreas;
}
assert( bounds[1][0] - bounds[0][0] < 1e4f && bounds[1][1] - bounds[0][1] < 1e4f && bounds[1][2] - bounds[0][2] < 1e4f );
if ( !areaNodes ) {