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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user