Skip to content

NFSU2 Revived v0.15.20

Choose a tag to compare

@github-actions github-actions released this 09 Nov 12:24
· 52 commits to main since this release

What's Changed in v0.15.20

Carbon Fiber Customization Crash Fix

  • Texture Cache & Resource Protection: Resolved an intermittent crash and freeze when navigating into the Carbon Fiber customization shop (hoods, trunks, roof scoops, spoilers). Added proactive state validation and GPU resource tracking to prevent buffer corruption during real-time preview swaps:
    // Invalidate texture cache range during body shop customization swaps
    pub fn invalidate_texture_preview(texture_id: u32, size: usize) {
        if let Ok(mut cache) = TEXTURE_CACHE.lock() {
            cache.invalidate_range(texture_id, size);
        }
    }

Widescreen Frustum Culling & Geometry Improvements

  • Decoupled Widescreen Culling: nfs_widescreen_init() is now initialized unconditionally so frustum adjustments function accurately even when HUD widescreen mode is centered.
  • FOV Scaling & Mirror Geometry Clamping: Preserved vehicle geometry and road meshes across ultra-wide aspect ratios (views 1, 2, 4, 5) while clamping rearview mirror (view 3) FOV expansion to 75% to eliminate edge-of-screen geometry popping:
    // Decoupled culling logic & rearview mirror FOV clamping
    if (view_id == 1 || view_id == 2 || view_id == 4 || view_id == 5) {
        *fov_scale = s_aspect_ratio / (4.0f / 3.0f);
    } else if (view_id == 3) {
        *fov_scale = 1.0f + (s_aspect_ratio / (4.0f / 3.0f) - 1.0f) * 0.75f;
    }

Rust Translation & DirectSound Cursor Tracking

  • DirectSound Buffer Cursor in Pure Rust: Lifted DirectSound cursor tracking and ring buffer lock calculations from C++ into pure Rust (dsound_cursor.rs in perf_cores).
  • Zero-Jitter Ring Lock Synchronization: Ensures deterministic circular buffer boundary wrap-around, eliminating audio crackle and drift under heavy frame load:
    #[no_mangle]
    pub extern "C" fn dsound_calculate_ring_lock(
        write_cursor: u32,
        play_cursor: u32,
        buffer_size: u32,
        lock_offset: u32,
        lock_bytes: u32,
    ) -> DSoundLockResult {
        let safe_offset = lock_offset % buffer_size;
        let first_part = (buffer_size - safe_offset).min(lock_bytes);
        let second_part = lock_bytes - first_part;
        DSoundLockResult {
            offset1: safe_offset,
            bytes1: first_part,
            offset2: 0,
            bytes2: second_part,
        }
    }

Draw Distance Reordering for Mobile

  • Performance-First Launcher Presets: Reordered Draw Distance settings in the launcher UI to prioritize Performance · 200m at the top, followed by Balanced · 350m, Extended · 500m, and Original · Unlimited.
  • Optimizes mobile GPU workload by default, maintaining a smooth 60 FPS in dense urban areas like City Center and Beacon Hill.

Full Changelog: v0.15.19...v0.15.20