Problem with debce0fb80 is the crashed process won't be killed until the user accepts the message box, and it's harder to get to the message box when the window is in full screen or the cursor is locked.
This change fixes a random X server lock-up that I get about 1 in 10 times when a crash is caught. I'm presuming it's an X server bug since faulty applications shouldn't be able to crash or freeze the X server under any circumstances.
The resizing of LTEX store to the correct number of plugins was done in the load() method, but the load method won't be called if a plugin contains LAND records but doesn't contain LTEX records. For such plugins the Store<ESM::LandTexture>::search() function would then fail an assertion.
This helps avoid a lock during the movie player's read method, since it needs
to sync with the current playback position which would otherwise need to get
the movie decoder's current position.
There is no change in behaviour since we were using the C locale.
The locale-aware tolower is much slower than the locale-unaware one. At least on Linux/GCC it calls dynamic_cast's, and is overall slower by an order of magnitude.
Use pointers as map keys instead of string IDs. Resolves a nasty performance bottleneck on functions like hasCommonDisease() that previously had to look up all contained spells from the ESM store on every call. hasCommonDisease() is called hundreds of times per frame by the AI target update since it's used to calculate target disposition.
The total cost of hasCommonDisease() was 2.7% of the frame loop, now it's negligible.
ESM::Cell::getCellId() was allocating a string on every call. This caused functions dealing with cellIds to be unnecessarily expensive.
For example, World::moveObject spent almost as much time comparing CellIds as it did updating Bullet's AABB after the move. OpGetDistance was by far the most expensive script instruction because it has to compare cellIds.
The total cost of getCellId() relative to the frame loop was about 0.3%.
The cache size is specified with a min/max range, intended to avoid constant
unloading once the limit is reached. This way, buffers can be unloaded down to
a reasonable mimimum, allowing some more buffers to be subsequently loaded
without causing more unloading.
A deque allows existing Sound_Buffer references to remain valid as long as new
ones are back-inserted. These references can be used instead of indices.
the user settings.cfg file. Add a helpful header to the top of new
settings.cfg files. Remove old code involve whitespace management
that didn't work correctly anayway, and doesn't matter since we're not
adding comments to the file. Remove "automatically generated"
comments.