diff --git a/crates/benilla-world/src/art_scope.rs b/crates/benilla-world/src/art_scope.rs index 101f22f1..d6e91fbb 100644 --- a/crates/benilla-world/src/art_scope.rs +++ b/crates/benilla-world/src/art_scope.rs @@ -17,8 +17,9 @@ use benilla_formats::TILE_SIZE; /// Real-clock seconds between sweeps (housekeeping, not world time); also the stamp's resolution. const SWEEP_SECS: f32 = 1.0; -/// Five ADT tiles (2667 yd), the smallest round tile multiple clear of [`radius_floor`]. -const DEFAULT_RADIUS_YD: f32 = 5.0 * TILE_SIZE; +/// Seven ADT tiles (3733 yd), the smallest round tile multiple clear of [`radius_floor`] +/// (MONKEY (presets): five until `farclip`'s ceiling rose past 777). +const DEFAULT_RADIUS_YD: f32 = 7.0 * TILE_SIZE; /// The far corner of the widest tile block the residency window keeps (at the `farclip` clamp's /// maximum), plus a tile: a stamp is where the viewer stood, so no smaller radius is safe. @@ -223,8 +224,8 @@ mod tests { "default {DEFAULT_RADIUS_YD} must clear the floor {}", radius_floor() ); - // (26 + 1 + 16) chunks each way at farclip 777, to the corner, plus a tile: ~2560 yd. - assert!((radius_floor() - 2560.0).abs() < 1.0, "{}", radius_floor()); + // (47 + 1 + 16) chunks each way at farclip 1497, to the corner, plus a tile: ~3550 yd. + assert!((radius_floor() - 3550.3).abs() < 1.0, "{}", radius_floor()); } /// `$WOW_ART_RADIUS` is unset in the test binary, as in every ordinary run. diff --git a/crates/benilla-world/src/view.rs b/crates/benilla-world/src/view.rs index b27fcbe6..9ea4bc94 100644 --- a/crates/benilla-world/src/view.rs +++ b/crates/benilla-world/src/view.rs @@ -75,8 +75,18 @@ pub struct ViewDistance { /// The settable range of [`ViewDistance::farclip`]: the reference's `farclip` clamp, /// `[0x81021c]` = 177 to `[0x80fed8]` = 777 in its validate callback `0x688d40`; shared by the -/// CVar apply, the options row and `$WOW_FARCLIP`. -pub const FARCLIP_RANGE: std::ops::RangeInclusive = 177.0..=777.0; +/// CVar apply, the options rows and `$WOW_FARCLIP`. +/// +/// MONKEY (presets) deviation: the ceiling is [`FARCLIP_MAX`], not 777. Modern fog +/// (`fog_model::modern_fog_end`) stretches the fog end past 777 with the view distance, so a +/// longer view is visible rather than fogged; the residency window and the model/particle walls +/// all follow `farclip`, and the ceiling is what bounds their memory (see [`FARCLIP_MAX`]). +pub const FARCLIP_RANGE: std::ops::RangeInclusive = 177.0..=FARCLIP_MAX; + +/// MONKEY (presets): the extended `farclip` ceiling — the reference's slider grid (177 + n·60) +/// carried on to n = 22. The residency window there is ±47 chunks, at most 7×7 ADT tiles against +/// 777's 5×5: about twice the reference maximum's terrain, doodads and WMOs, and no more. +pub const FARCLIP_MAX: f32 = 1497.0; /// The settable range of [`ViewDistance::nearclip`]: the bounds in the reference's `nearclip` /// change callback `0x688d90`, `[0x8029d0]` = 0.01 and `[0x808300]` = 0.33.