RaidMenuCleanupFix
Summary
Removes the brief freeze when opening the escape menu during a raid in SPT (Single Player Tarkov).
Escape from Tarkov schedules a memory cleanup a few frames after the menu opens: garbage collection and optional RAM cleanup. That work runs on the main thread and can hitch gameplay at the worst possible moment. This mod skips that cleanup while you are in an active raid.
Problem
Pressing Escape during a raid opens the in-raid menu (MenuScreen). Vanilla code runs a memory cleanup callback shortly after the menu appears. Even with “Clear RAM” disabled in game settings, this can cause a noticeable stutter. In a firefight, that delay can be costly.
Solution
A lightweight BepInEx patch intercepts the menu cleanup callback and skips it when the player is in a raid. Cleanup outside raids is unchanged.