mirror of
https://github.com/brues-code/ClassicAPI.git
synced 2026-11-16 16:10:36 +00:00
A ClassicAPI extension, off by default: actor:SetShadowShown(shown) / IsShadowShown() put the world's blob shadow under the actor. The shadow is 1.12's own (DrawBlobShadow 0x006D7920, reached from the entity draw through 0x006D78F0): drawn only while shadowLOD (0x0086F5B4) is 1 and the model is ready; the bounds of sequence (0, 0), skipped when the x or y extent is under the range epsilon, clamped to +-5 and multiplied by the length of the base transform's row 0 (GetBaseTransform 0x00710600); the four corners turned by the base rotation and moved by the base translation. The texture is the one the unit setup loads (Textures\ShadowBlob.blp, handle 0x00CE9DFC, device object through 0x0044ACF0), with the decal's states: blend 4 (DST_COLOR / ZERO), lighting, fog and depth write off, combiner preset 5, and the colour white with the model's alpha (GetAlpha 0x00710CA0; 0x004A2C10 packs that byte on top). The world lays the shadow onto the ground's batches with a decal (0x006D7330). A scene has no ground, so the paint draws the turned box itself as a flat triangle strip on the plane of the base translation, after the animate pass and before the draw passes, so every model draws over the shadows. Culling is off, as for the engine's lightning quad (0x007AFCB0). The decal's height fade and its shadowBias depth test EQUAL are not drawn: both exist to match real ground. A model hung on another casts none.