Files
ClassicAPI/docs
Brues 454be4ce49 feat(model): foam rings and wakes of actors in shallow water
An actor whose movement is on now leaves the world's ripples in shallow
liquid: foam rings while it stands, turns or splashes, wakes along its
motion while it moves.

The world keeps its ripples in one pool of 128 records (0x50 bytes) that
its liquid query fills and its liquid pass draws. A scene keeps a pool
of its own with the same records (model/SceneWater.cpp), and the steps
are transcribed:

- CGUnit_C::EmitWaterRipple (0x005FA760), each actor update (as
  0x0060802E) and after the swim decision's splash (kind 0xC9, as
  0x0060319F): with the unit's liquid and bit 0x40 (flag 0x1 of the
  area's LiquidType, kept now by the placement's liquid leg), the depth
  under twice the collision height (at least 1.0) and the next time
  (+0xC78) reached. The kind (moving 0xF, turning 0x30, still, splash)
  and the table 0x00860A4C {0, 0, 1, 0} make a wake or a ring; the size,
  lifetime and growth come from three draws of the client random stream
  and the function's own constants, scaled down past half the depth and
  for a still unit (0x0080C474); a ring takes a fourth draw for its
  heading, a wake the motion's; the next time follows the speed, or
  400 ms and a draw's share of 50.
- AddSplash's immediate leg (0x0068BDA0, gated by waterRipples
  0x0086A03C and mode 0x00C89DB8), AddRipple (0x0068F9F0: the active
  mover's range 0 to 31) and EmitRipple (0x0068F5C0): the record, its
  rise and decay at 0.4 of the life (0x00810348), and the liquid
  triangles TestWorldBox finds in its box with class 0xF0000, here
  World::LiquidTriangles over the WMO and the scene's terrain.
- UpdateRipples (0x0068FAE0), its ageing in the scene's update and its
  draw in the scene's liquid phase: blend 3, fog, depth write, culling
  and lighting off, the depth bias footstepBias x 1/1024, the world
  stack at Translate(-eye), per category its texture (0x00C800E4) over
  format 4 vertices with the alpha's byte over white and the uv through
  BuildDecalTransforms (0x006D6FA0) of the box turned by the heading.

The scene's terrain box test (TestTerrainBox) now has TestChunkBox's
liquid leg (0x006AD75E): GatherLiquidCellFacets on each slot the class
names, into the same batches. The shadow decal's class asks for liquid
too, so actor shadows lie on terrain water as in the world.

The scene's clock times the ripples, so a paused scene holds them.
2026-11-12 01:58:47 -06:00
..
2026-05-07 15:08:45 -05:00
2026-05-07 15:52:48 -05:00
2026-05-10 00:10:06 -05:00
2026-05-07 16:28:32 -05:00
2026-05-07 12:23:57 -05:00
2026-05-07 15:08:45 -05:00
2026-05-07 15:08:45 -05:00
2026-05-09 14:23:40 -05:00