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
+3 -2
View File
@@ -42,11 +42,12 @@ namespace MSCO
foreach (Car c in cars.Values) StopFollowing(c);
cars.Clear();
seen.Clear();
nextScan = 0f;
nextScan = -1f; // erster Suchlauf verteilt, siehe Update
}
public void Update(bool authority, float dt, Action<MsgType, byte[]> send)
{
if (nextScan < 0f) nextScan = Time.time + 4.5f; // nicht alle Sync-Teile im selben Frame suchen lassen
if (Time.time >= nextScan)
{
nextScan = Time.time + ScanInterval;
@@ -136,7 +137,7 @@ namespace MSCO
void Scan()
{
int before = cars.Count;
foreach (Rigidbody rb in UnityEngine.Object.FindObjectsOfType<Rigidbody>())
foreach (Rigidbody rb in SceneCache.Rigidbodies(5f)) // teilt sich die Suche mit dem Objekt-Sync
{
if (rb == null || !seen.Add(rb)) continue;
if (Array.IndexOf(Roots, rb.transform.root.name) < 0) continue;