Lemmings Forums

Other Lemmings Projects => Lemmini => Topic started by: WillLem on March 17, 2026, 02:14:35 PM

Title: [✓][BUG] Terrain piece index causes crash when incorrect
Post by: WillLem on March 17, 2026, 02:14:35 PM
From ericderkovits, on Discord:

Quote from: ericderkovitsi just noticed in your snow tile set there are 46 terrain pieces (0 to 45), but in the snow.ini it says tiles = 37  so when playing a snow level it crashes. In the snow.ini, it should say tiles = 46
Title: Re: [+][BUG] Terrain piece index causes crash when incorrect
Post by: WillLem on March 17, 2026, 02:17:50 PM
My instinct here is to simply remove the need to manually index terrain pieces in the .ini.

Unlike objects, which need object-specific data to be present in the .ini on a per-object basis, terrain pieces can simply be counted. As long as the pieces are named correctly (i.e. 'nameofstyle_n' where n increases from 0 with each additional piece), the required index can be built from there.
Title: Re: [+][BUG] Terrain piece index causes crash when incorrect
Post by: WillLem on March 17, 2026, 04:24:48 PM
We now count (and cache) the terrain pieces for each style, guaranteeing that the index is always up to date.

Implemented in RLPlayer commit 08996a9.