MSCO 2.10.1: car doors and garage door synced, door lock fix, perf tools

- Car doors (FSM with bool "Open" and "Open door"/"Close door") are synced as open/closed:
  the receiver removes the hold joint and frees the hinge, closing runs the game's own logic
- Fix: every synced close of an already closed Satsuma door added another FixedJoint, so the
  door could not be opened anymore; extra joints are removed automatically
- Hinge sync also covers world doors/gates with hinges (garage door), interaction by bounds
- Scene name read once per frame (Application.loadedLevelName allocates a string per call)
- Console "perf" (FPS, ms per MSCO part incl. OnGUI, GC, hook calls), -msco-perf start option
- Console "fsmdump <text>" / -msco-dump: PlayMaker FSMs and hinges to MSCO\fsmdump.txt

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-03 11:01:27 +02:00
co-authored by Claude Opus 5.5
parent 4c1366b5d9
commit adc6eff9e8
14 changed files with 429 additions and 11 deletions
+10
View File
@@ -339,6 +339,7 @@ namespace MSCO
void MeasureFps()
{
float dt = Time.unscaledDeltaTime;
PerfStats.Frame(dt);
fpsFrames++;
fpsTimer += dt;
frameMsWorstWindow = Mathf.Max(frameMsWorstWindow, dt * 1000f);
@@ -1992,6 +1993,7 @@ namespace MSCO
void OnLevelWasLoaded(int level)
{
MenuHelper.SceneChanged();
menuButtonsHidden = false; // neues Hauptmenü: Knöpfe wieder ausblenden
nextPresenceUpdate = 0f; // Discord gleich nach dem Szenenwechsel aktualisieren
if (MenuHelper.InGame)
@@ -2252,6 +2254,7 @@ namespace MSCO
{
double ms = (partWatch.ElapsedTicks - partStart) * 1000.0 / System.Diagnostics.Stopwatch.Frequency;
frameMsco += ms;
PerfStats.Add(name, ms);
if (ms > slowestMs) { slowestMs = ms; slowestPart = name; }
}
@@ -2594,6 +2597,13 @@ namespace MSCO
// ---------------------------------------------------------------- GUI
void OnGUI()
{
PartStart();
try { DrawGui(); }
finally { PartEnd("interface (OnGUI)"); }
}
void DrawGui()
{
InputLock.KeepCursorFree();
if (MenuHelper.InMenu)