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:
+18
-1
@@ -124,6 +124,7 @@ namespace MSCO
|
||||
{
|
||||
void Start()
|
||||
{
|
||||
host = this;
|
||||
MscoLog.Info("Welcome to MSCO by mbm.wtf");
|
||||
MenuBranding.ApplyWindow();
|
||||
// Den Nachrichten-Bildschirm des Spiels ("Latest news ... press any key") überspringen - direkt ins Hauptmenü
|
||||
@@ -153,7 +154,22 @@ namespace MSCO
|
||||
ModLoader.LoadLocal();
|
||||
ModLoader.MenuLoad();
|
||||
}
|
||||
else if (scene == "GAME") ModLoader.GameLoad();
|
||||
else if (scene == "GAME")
|
||||
{
|
||||
ModLoader.GameLoad();
|
||||
string[] cmd = Environment.GetCommandLineArgs();
|
||||
int i = Array.IndexOf(cmd, "-msco-dump");
|
||||
if (i >= 0 && i + 1 < cmd.Length && host != null) host.StartCoroutine(DumpLater(cmd[i + 1]));
|
||||
}
|
||||
}
|
||||
|
||||
static MscoHost host;
|
||||
|
||||
static System.Collections.IEnumerator DumpLater(string filter)
|
||||
{
|
||||
yield return new WaitForSeconds(25f);
|
||||
try { Bootstrap.Log("FSM dump: " + FsmDump.Write(filter)); }
|
||||
catch (Exception e) { Bootstrap.Log("FSM dump failed: " + e); }
|
||||
}
|
||||
|
||||
void FixedUpdate()
|
||||
@@ -200,6 +216,7 @@ namespace MSCO
|
||||
|
||||
void OnLevelWasLoaded(int level)
|
||||
{
|
||||
MenuHelper.SceneChanged();
|
||||
loadingScreen = false;
|
||||
if (previousVolume >= 0f) { AudioListener.volume = previousVolume; previousVolume = -1f; }
|
||||
Bootstrap.Log("Level loaded: " + Application.loadedLevelName);
|
||||
|
||||
Reference in New Issue
Block a user