Crisp launcher (sizes and fonts scaled in screen pixels instead of a GUI matrix), fps command and display, fewer hitches (staggered scans, shared rigidbody scan, crash-damage mesh reads only after impacts, rarer vehicle fx lookups, cached display prefs)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-01 20:26:43 +02:00
co-authored by Claude Opus 5.5
parent 0b55d270e5
commit 7d341126e8
13 changed files with 381 additions and 231 deletions
+21
View File
@@ -14,6 +14,27 @@ namespace MSCO
static float builtAt = -1000f;
static int builtForLevel = -1;
static Rigidbody[] bodies = new Rigidbody[0];
static float bodiesAt = -1000f;
static int bodiesForLevel = -1;
/// <summary>
/// Alle Rigidbodies; höchstens maxAge Sekunden alt (Objekt-Sync und Verkehr teilen sich die teure Suche).
/// Einträge können inzwischen zerstört sein (== null prüfen).
/// </summary>
public static Rigidbody[] Rigidbodies(float maxAge)
{
if (Time.realtimeSinceStartup - bodiesAt > maxAge || bodiesForLevel != Application.loadedLevel)
{
Object[] found = Object.FindObjectsOfType(typeof(Rigidbody));
bodies = new Rigidbody[found.Length];
for (int i = 0; i < found.Length; i++) bodies[i] = (Rigidbody)found[i];
bodiesAt = Time.realtimeSinceStartup;
bodiesForLevel = Application.loadedLevel;
}
return bodies;
}
/// <summary>Alle FSMs; höchstens maxAge Sekunden alt. Einträge können inzwischen zerstört sein (== null prüfen).</summary>
public static PlayMakerFSM[] Fsms(float maxAge)
{