The shapes library has such pointer chains. The leaks were getting pretty heavy because they included pointers to C4AulFuncs, which kept a lot of parts of the script engine and string tables in memory.
The string table of System.ocg scripts (except the global System.ocg) pointed to nowhere after the initial load phase, but is still required for reload. Added a ref counting option to keep these string tables alive.
Instead of doing the transformation when drawing a mesh. This allows making
the OpenGL normal matrix more consistent, since it does not include the
Ogre-To-Clonk transformation, and so that the transformation does not need
to be inverted in the shader.
As a side effect, all Attach transformations were updated, since before
they were specified in the OGRE reference frame, not the Clonk reference
frame.
What happens is that mape first loads the TexMap.txt, however adding all the
texmap entries internally fails, because the materials and textures are not
yet loaded. However, mape must first load the TexMap to see if
OverloadMaterials or OverloadTextures are present in it, to know what
materials/textures to actually load.
For whatever reason, the shader code that was passed to the compiler was
different from the code that got written to the shader log. This is a
huge pain in the ass when trying to debug shader errors because the line
information is completely wrong. I assume this decision was a premature
optimization, so I've removed it and we'll now log the exact same code
as the shader compiler sees.
This should simplify insertion of new textures at arbitrary drawing orders without reassigning palette indices (the latter would invalidate all old maps).
This caused some sounds to not play at all when the object was inaudible at the position the sound was initially launched, but then moved into view (e.g. elevator cases or the planes in The Raid).
Sound() called when the instance is already running used to fail. Now, it always succeeds (also for script sync safety) but updates the sound level and pitch parameters. SoundAt has not been modified since it allows creation of multiple concurrent sound instance of the same effect without object context.
People have complained that the implicit roll (if you don't know how it worked) could lead to death and severe injury. The roll is now explicit. Always and everywhere.
It doesn't have any other effect though; todo: reduce hit area and/or squash vertices of Clonk during roll
The new behaviour that allows 255 mat-tex combinations (once we increased
C4M_MaxTexCount...) is enabled with MapFg.bmp, and then MapBg.bmp can be
used to draw IFT or other fancy things.