From e36956e438c3b821919a607db5ad38aad826bb84 Mon Sep 17 00:00:00 2001 From: Thomas Mathieson Date: Tue, 3 May 2022 01:08:27 +0100 Subject: [PATCH 1/3] + Added MapObjInst.Rotation setter + Populate most of the fields in OmsiVehicleInst * Updated demo CLI program to be more useful for debugging * Updated package version * Changed some internal constructors to public so that they work with object array demarshalling * Fixed a bunch of fields marked as TODO --- OmsiExtensionsCLI/Program.cs | 21 +- .../Properties/launchSettings.json | 2 +- OmsiHook/OmsiCamera.cs | 2 +- OmsiHook/OmsiHook.cs | 2 +- OmsiHook/OmsiHook.csproj | 2 +- OmsiHook/OmsiMap.cs | 2 +- OmsiHook/OmsiMapObjInst.cs | 13 +- OmsiHook/OmsiMovingMapObjInst.cs | 2 +- OmsiHook/OmsiPartikel.cs | 7 +- OmsiHook/OmsiPartikelemitter.cs | 9 +- OmsiHook/OmsiPassengerCabin.cs | 20 +- OmsiHook/OmsiPathManager.cs | 2 +- OmsiHook/OmsiPathPoint.cs | 4 +- OmsiHook/OmsiPhysObj.cs | 2 +- OmsiHook/OmsiPhysObjInst.cs | 4 +- OmsiHook/OmsiRoadVehicle.cs | 2 +- OmsiHook/OmsiVehicleInst.cs | 219 +++++++++++++++++- OmsiHookPlugin/OmsiHookPlugin.cs | 2 +- 18 files changed, 263 insertions(+), 54 deletions(-) diff --git a/OmsiExtensionsCLI/Program.cs b/OmsiExtensionsCLI/Program.cs index f8a5090..eba5347 100644 --- a/OmsiExtensionsCLI/Program.cs +++ b/OmsiExtensionsCLI/Program.cs @@ -1,6 +1,7 @@ using System; using System.Threading; using OmsiHook; +using System.Threading.Tasks; namespace OmsiExtensionsCLI { @@ -11,21 +12,29 @@ static void Main(string[] args) Console.WriteLine("#=#=#=#=#=# OmsiExtensions Testing #=#=#=#=#=#"); OmsiHook.OmsiHook omsi = new(); - omsi.AttachToOMSI(); + Task.WaitAll(omsi.AttachToOMSI()); + Console.Clear(); while (true) { var pos = omsi.PlayerVehicle.Position; + var posa = omsi.PlayerVehicle.AbsPosition; + var vel = omsi.PlayerVehicle.Velocity; var map = omsi.Map; var weather = omsi.Weather; - Console.WriteLine($"Read data: x:{pos.x:F3}\ty:{pos.y:F3}\tz:{pos.z:F3}\t\t" + - $"tile:{0}\trow45:{0:F3}\trow47:{0:F3}"); + Console.SetCursorPosition(0, 0); + Console.WriteLine(($"Read data: x:{pos.x:F3} y:{pos.y:F3} z:{pos.z:F3} " + + $"tile:{omsi.PlayerVehicle.Kachel}").PadRight(Console.WindowWidth - 1)); + Console.WriteLine($"Read data: vx:{vel.x:F3} vy:{vel.y:F3} vz:{vel.z:F3}".PadRight(Console.WindowWidth-1)); + Console.WriteLine($"Read data: ax:{posa._30:F3} ay:{posa._31:F3} az:{posa._32:F3}".PadRight(Console.WindowWidth-1)); - Console.WriteLine($"Read data: map:{map.Name}\tpath:{map.Filename}\tfriendly:{map.FriendlyName}"); - Console.WriteLine($"Read data: act w name:{weather.ActWeather.name}"); + Console.WriteLine($"Read data: map:{map.Name} path:{map.Filename} friendly:{map.FriendlyName}".PadRight(Console.WindowWidth-1)); + Console.WriteLine("".PadRight(Console.WindowWidth-1)); + omsi.PlayerVehicle.Velocity = new D3DVector { x=0, y=0, z=5 }; + var b = omsi.PlayerVehicle.PAI_LastBrake; - Thread.Sleep(500); + Thread.Sleep(50); } } } diff --git a/OmsiExtensionsCLI/Properties/launchSettings.json b/OmsiExtensionsCLI/Properties/launchSettings.json index 4b3b934..82d6650 100644 --- a/OmsiExtensionsCLI/Properties/launchSettings.json +++ b/OmsiExtensionsCLI/Properties/launchSettings.json @@ -2,7 +2,7 @@ "profiles": { "OmsiExtensionsCLI": { "commandName": "Project", - "nativeDebugging": true + "nativeDebugging": false } } } \ No newline at end of file diff --git a/OmsiHook/OmsiCamera.cs b/OmsiHook/OmsiCamera.cs index 2a4372a..ca1d54e 100644 --- a/OmsiHook/OmsiCamera.cs +++ b/OmsiHook/OmsiCamera.cs @@ -3,7 +3,7 @@ public class OmsiCamera : OmsiObject { internal OmsiCamera(Memory omsiMemory, int baseAddress) : base(omsiMemory, baseAddress) { } - internal OmsiCamera() : base() { } + public OmsiCamera() : base() { } public string Name { diff --git a/OmsiHook/OmsiHook.cs b/OmsiHook/OmsiHook.cs index 196c980..d5acd5e 100644 --- a/OmsiHook/OmsiHook.cs +++ b/OmsiHook/OmsiHook.cs @@ -28,7 +28,7 @@ public class OmsiHook /// Attaches the hooking application to OMSI.exe. /// Always call this at some point before trying to read and write data. /// - public async void AttachToOMSI() + public async Task AttachToOMSI() { Console.WriteLine("Attaching to OMSI.exe..."); diff --git a/OmsiHook/OmsiHook.csproj b/OmsiHook/OmsiHook.csproj index 9410771..edaf645 100644 --- a/OmsiHook/OmsiHook.csproj +++ b/OmsiHook/OmsiHook.csproj @@ -12,7 +12,7 @@ false 1.0.1.0 1.0.1.0 - 1.3.0 + 1.4.0 LGPL-3.0-only False README.md diff --git a/OmsiHook/OmsiMap.cs b/OmsiHook/OmsiMap.cs index 615c9a9..e5a1563 100644 --- a/OmsiHook/OmsiMap.cs +++ b/OmsiHook/OmsiMap.cs @@ -5,7 +5,7 @@ namespace OmsiHook public class OmsiMap : OmsiObject { internal OmsiMap(Memory omsiMemory, int baseAddress) : base(omsiMemory, baseAddress) { } - internal OmsiMap() : base() { } + public OmsiMap() : base() { } public OmsiPoint NW_Corner { diff --git a/OmsiHook/OmsiMapObjInst.cs b/OmsiHook/OmsiMapObjInst.cs index 38f3333..ed999d7 100644 --- a/OmsiHook/OmsiMapObjInst.cs +++ b/OmsiHook/OmsiMapObjInst.cs @@ -3,27 +3,28 @@ public class OmsiMapObjInst : OmsiObject { internal OmsiMapObjInst(Memory omsiMemory, int baseAddress) : base(omsiMemory, baseAddress) { } - internal OmsiMapObjInst() : base() { } + public OmsiMapObjInst() : base() { } public D3DVector Position { get => Memory.ReadMemory(Address + 0x4); set => Memory.WriteMemory(Address + 0x4, value); } - public D3DMatrix Pos_Mat { get => Memory.ReadMemory(Address + 0x10); set => Memory.WriteMemory(Address + 0x10, value); } - - public D3DXQuaternion Rotation => Memory.ReadMemory(Address + 0x50); + public D3DXQuaternion Rotation + { + get => Memory.ReadMemory(Address + 0x50); + set => Memory.WriteMemory(Address + 0x50, value); + } public float Scale { get => Memory.ReadMemory(Address + 0x60); set => Memory.WriteMemory(Address + 0x60, value); } - public D3DMatrix RelMatrix => Memory.ReadMemory(Address + 0x64); public D3DMatrix Used_RelVec => Memory.ReadMemory(Address + 0x68); public int Kachel @@ -31,13 +32,11 @@ public int Kachel get => Memory.ReadMemory(Address + 0x74); set => Memory.WriteMemory(Address + 0x74, value); } - public D3DMatrix AbsPosition { get => Memory.ReadMemory(Address + 0x78); set => Memory.WriteMemory(Address + 0x78, value); } - public D3DMatrix AbsPosition_Inv => Memory.ReadMemory(Address + 0xb8); public D3DMatrix AbsPosition_ThreadFree => Memory.ReadMemory(Address + 0xf8); } diff --git a/OmsiHook/OmsiMovingMapObjInst.cs b/OmsiHook/OmsiMovingMapObjInst.cs index 9bb9265..4e83d76 100644 --- a/OmsiHook/OmsiMovingMapObjInst.cs +++ b/OmsiHook/OmsiMovingMapObjInst.cs @@ -3,6 +3,6 @@ public class OmsiMovingMapObjInst : OmsiComplMapObjInst { internal OmsiMovingMapObjInst(Memory omsiMemory, int baseAddress) : base(omsiMemory, baseAddress) { } - internal OmsiMovingMapObjInst() : base() { } + public OmsiMovingMapObjInst() : base() { } } } \ No newline at end of file diff --git a/OmsiHook/OmsiPartikel.cs b/OmsiHook/OmsiPartikel.cs index 4618ed7..b05d2b8 100644 --- a/OmsiHook/OmsiPartikel.cs +++ b/OmsiHook/OmsiPartikel.cs @@ -5,7 +5,7 @@ namespace OmsiHook public class OmsiPartikel : OmsiObject { internal OmsiPartikel(Memory omsiMemory, int baseAddress) : base(omsiMemory, baseAddress) { } - internal OmsiPartikel() : base() { } + public OmsiPartikel() : base() { } public D3DVector Position { @@ -18,7 +18,7 @@ public D3DVector Veloc set => Memory.WriteMemory(Address + 0x10, value); } /// - /// Birthday? + /// Birth time /// public uint Geburtsdatum { @@ -26,7 +26,7 @@ public uint Geburtsdatum set => Memory.WriteMemory(Address + 0x1c, value); } /// - /// Death Day? + /// Death time /// public uint Sterbedatum { @@ -114,6 +114,5 @@ public float TempAlpha get => Memory.ReadMemory(Address + 0x58); set => Memory.WriteMemory(Address + 0x58, value); } - } } diff --git a/OmsiHook/OmsiPartikelemitter.cs b/OmsiHook/OmsiPartikelemitter.cs index 5943d64..1543b4e 100644 --- a/OmsiHook/OmsiPartikelemitter.cs +++ b/OmsiHook/OmsiPartikelemitter.cs @@ -5,7 +5,7 @@ namespace OmsiHook public class OmsiPartikelEmitter : OmsiObject { internal OmsiPartikelEmitter(Memory omsiMemory, int baseAddress) : base(omsiMemory, baseAddress) { } - internal OmsiPartikelEmitter() : base() { } + public OmsiPartikelEmitter() : base() { } public uint LastEmitTime { @@ -106,12 +106,7 @@ public bool Spotlight_Calc get => Memory.ReadMemory(Address + 0x60); set => Memory.WriteMemory(Address + 0x60, value); } - /* TODO: - public OmsiPartikel[] Partikel - { - get => omsiMemory.ReadMemory(baseAddress + 0x64); - //set => omsiMemory.WriteMemory(baseAddress + 0x64, value); - }*/ + public OmsiPartikel[] Partikel => Memory.ReadMemoryObjArray(Address + 0x64); public int Textur { get => Memory.ReadMemory(Address + 0x68); diff --git a/OmsiHook/OmsiPassengerCabin.cs b/OmsiHook/OmsiPassengerCabin.cs index 789632b..0da59b0 100644 --- a/OmsiHook/OmsiPassengerCabin.cs +++ b/OmsiHook/OmsiPassengerCabin.cs @@ -3,26 +3,18 @@ public class OmsiPassengerCabin : OmsiObject { internal OmsiPassengerCabin(Memory omsiMemory, int baseAddress) : base(omsiMemory, baseAddress) { } - internal OmsiPassengerCabin() : base() { } + public OmsiPassengerCabin() : base() { } public OmsiSeat[] Seats { get => Memory.ReadMemoryStructArray(Address + 0x4); } - /* TODO: - public OmsiPathPoint[] Entries - { - get => Memory.ReadMemoryStructArray(Address + 0x8); - }*/ + public OmsiPathPoint[] Entries => Memory.ReadMemoryObjArray(Address + 0x8); public OmsiEntryProp[] EntriesProp { get => Memory.ReadMemoryStructArray(Address + 0xc); } - /* TODO: - public OmsiPathPoint[] Exits - { - get => Memory.ReadMemoryStructArray(Address + 0x10); - }*/ + public OmsiPathPoint[] Exits => Memory.ReadMemoryObjArray(Address + 0x10); public OmsiPassCabinStamper Stamper { get => Memory.ReadMemory(Address + 0x14); @@ -31,10 +23,6 @@ public OmsiPassCabinStamper Stamper { get => Memory.ReadMemory(Address + 0x28); } - /* TODO: - public OmsiPathPoint[] LinkToOtherVehicle - { - get => Memory.ReadMemoryStructArray(Address + 0x7c); - }*/ + public OmsiPathPoint[] LinkToOtherVehicle => Memory.ReadMemoryObjArray(Address + 0x7c); } } \ No newline at end of file diff --git a/OmsiHook/OmsiPathManager.cs b/OmsiHook/OmsiPathManager.cs index b3e1cd1..b49d165 100644 --- a/OmsiHook/OmsiPathManager.cs +++ b/OmsiHook/OmsiPathManager.cs @@ -3,7 +3,7 @@ public class OmsiPathManager : OmsiObject { internal OmsiPathManager(Memory omsiMemory, int baseAddress) : base(omsiMemory, baseAddress) { } - internal OmsiPathManager() : base() { } + public OmsiPathManager() : base() { } public int StepSoundPacks { diff --git a/OmsiHook/OmsiPathPoint.cs b/OmsiHook/OmsiPathPoint.cs index f226798..ea66989 100644 --- a/OmsiHook/OmsiPathPoint.cs +++ b/OmsiHook/OmsiPathPoint.cs @@ -3,6 +3,8 @@ public class OmsiPathPoint : OmsiObject { internal OmsiPathPoint(Memory omsiMemory, int baseAddress) : base(omsiMemory, baseAddress) { } - internal OmsiPathPoint() : base() { } + public OmsiPathPoint() : base() { } + + //TODO: Complete OmsiPathPoint } } \ No newline at end of file diff --git a/OmsiHook/OmsiPhysObj.cs b/OmsiHook/OmsiPhysObj.cs index adde603..e6e6dbf 100644 --- a/OmsiHook/OmsiPhysObj.cs +++ b/OmsiHook/OmsiPhysObj.cs @@ -3,7 +3,7 @@ public class OmsiPhysObj : OmsiObject { internal OmsiPhysObj(Memory omsiMemory, int baseAddress) : base(omsiMemory, baseAddress) { } - internal OmsiPhysObj() : base() { } + public OmsiPhysObj() : base() { } public string FileName // ANSI String { diff --git a/OmsiHook/OmsiPhysObjInst.cs b/OmsiHook/OmsiPhysObjInst.cs index 8699570..137faa6 100644 --- a/OmsiHook/OmsiPhysObjInst.cs +++ b/OmsiHook/OmsiPhysObjInst.cs @@ -3,10 +3,10 @@ public class OmsiPhysObjInst : OmsiMapObjInst { internal OmsiPhysObjInst(Memory omsiMemory, int baseAddress) : base(omsiMemory, baseAddress) { } - internal OmsiPhysObjInst() : base() { } + public OmsiPhysObjInst() : base() { } /* - * Unimplemented fields: + * TODO:Unimplemented fields: * PdxBody PH_Body; 0x138 * PdxGeom PH_MainGeomTrafo; 0x13c * PdxGeom PH_MainGeom; 0x140 diff --git a/OmsiHook/OmsiRoadVehicle.cs b/OmsiHook/OmsiRoadVehicle.cs index 6a6e9c2..290bf13 100644 --- a/OmsiHook/OmsiRoadVehicle.cs +++ b/OmsiHook/OmsiRoadVehicle.cs @@ -3,6 +3,6 @@ public class OmsiRoadVehicle : OmsiVehicle { internal OmsiRoadVehicle(Memory omsiMemory, int baseAddress) : base(omsiMemory, baseAddress) { } - internal OmsiRoadVehicle() : base() { } + public OmsiRoadVehicle() : base() { } } } \ No newline at end of file diff --git a/OmsiHook/OmsiVehicleInst.cs b/OmsiHook/OmsiVehicleInst.cs index 5a9075d..92501a4 100644 --- a/OmsiHook/OmsiVehicleInst.cs +++ b/OmsiHook/OmsiVehicleInst.cs @@ -3,6 +3,223 @@ public class OmsiVehicleInst : OmsiMovingMapObjInst { internal OmsiVehicleInst(Memory omsiMemory, int baseAddress) : base(omsiMemory, baseAddress) { } - internal OmsiVehicleInst() : base() { } + public OmsiVehicleInst() : base() { } + + //TODO: + /*public OmsiCriticalSection CS_AI_BusStopData + { + get => Memory.ReadMemory(Address + 0x4f0); + set => Memory.WriteMemory(Address + 0x4f0, value); + }*/ + + /// + /// Last seat height + /// + public float LastSitzHgt + { + get => Memory.ReadMemory(Address + 0x510); + set => Memory.WriteMemory(Address + 0x510, value); + } + + /// + /// Last seat velocity + /// + public float LastSitzVeloc + { + get => Memory.ReadMemory(Address + 0x514); + set => Memory.WriteMemory(Address + 0x514, value); + } + + /// + /// Seat matrix + /// + public D3DMatrix SitzMatrix + { + get => Memory.ReadMemory(Address + 0x518); + set => Memory.WriteMemory(Address + 0x518, value); + } + + public D3DMatrix DriverMatrix + { + get => Memory.ReadMemory(Address + 0x558); + set => Memory.WriteMemory(Address + 0x558, value); + } + + public D3DVector HeadPos + { + get => Memory.ReadMemory(Address + 0x598); + set => Memory.WriteMemory(Address + 0x598, value); + } + + public D3DVector HeadVeloc + { + get => Memory.ReadMemory(Address + 0x5a4); + set => Memory.WriteMemory(Address + 0x5a4, value); + } + + public float CS_AI_BusStopData + { + get => Memory.ReadMemory(Address + 0x510); + set => Memory.WriteMemory(Address + 0x510, value); + } + + public OmsiCamera[] Cameras_Driver => Memory.ReadMemoryObjArray(Address + 0x5b0); + + public OmsiCamera[] Cameras_Pax => Memory.ReadMemoryObjArray(Address + 0x5b4); + + public OmsiCamera Camera_Driver => new(Memory, Memory.ReadMemory(Address + 0x5b8)); + + public OmsiCamera Camera_Pax => new(Memory, Memory.ReadMemory(Address + 0x5bc)); + + public int Act_Camera_Driver + { + get => Memory.ReadMemory(Address + 0x5c0); + set => Memory.WriteMemory(Address + 0x5c0, value); + } + + public int Act_Camera_Pax + { + get => Memory.ReadMemory(Address + 0x5c4); + set => Memory.WriteMemory(Address + 0x5c4, value); + } + + public float Rad_M_Ab + { + get => Memory.ReadMemory(Address + 0x5c8); + set => Memory.WriteMemory(Address + 0x5c8, value); + } + + public float Rad_N_Ab + { + get => Memory.ReadMemory(Address + 0x5cc); + set => Memory.WriteMemory(Address + 0x5cc, value); + } + + /// + /// Braking power + /// + public float Bremskraft + { + get => Memory.ReadMemory(Address + 0x5d0); + set => Memory.WriteMemory(Address + 0x5d0, value); + } + + public bool Amplify + { + get => Memory.ReadMemory(Address + 0x5d4); + set => Memory.WriteMemory(Address + 0x5d4, value); + } + + public bool Throttle_Pressed + { + get => Memory.ReadMemory(Address + 0x5d5); + set => Memory.WriteMemory(Address + 0x5d5, value); + } + + public bool WheelBackRunning + { + get => Memory.ReadMemory(Address + 0x5d6); + set => Memory.WriteMemory(Address + 0x5d6, value); + } + + public float MaxWert_Gas_O_Amplify + { + get => Memory.ReadMemory(Address + 0x5d8); + set => Memory.WriteMemory(Address + 0x5d8, value); + } + + public float Throttle + { + get => Memory.ReadMemory(Address + 0x5dc); + set => Memory.WriteMemory(Address + 0x5dc, value); + } + + /// + /// Brake pedal + /// + public float Bremspedal + { + get => Memory.ReadMemory(Address + 0x5e0); + set => Memory.WriteMemory(Address + 0x5e0, value); + } + + /// + /// Clutch + /// + public float Kupplung + { + get => Memory.ReadMemory(Address + 0x5e4); + set => Memory.WriteMemory(Address + 0x5e4, value); + } + + public float Microphone + { + get => Memory.ReadMemory(Address + 0x5e8); + set => Memory.WriteMemory(Address + 0x5e8, value); + } + + public float Radio + { + get => Memory.ReadMemory(Address + 0x5ec); + set => Memory.WriteMemory(Address + 0x5ec, value); + } + + public float PrecipRate + { + get => Memory.ReadMemory(Address + 0x5f0); + set => Memory.WriteMemory(Address + 0x5f0, value); + } + + public float DirtRate + { + get => Memory.ReadMemory(Address + 0x5f4); + set => Memory.WriteMemory(Address + 0x5f4, value); + } + + public float Dirt + { + get => Memory.ReadMemory(Address + 0x5f8); + set => Memory.WriteMemory(Address + 0x5f8, value); + } + + public float CabinAir_Temp + { + get => Memory.ReadMemory(Address + 0x5fc); + set => Memory.WriteMemory(Address + 0x5fc, value); + } + + public float CabinAir_RelHum + { + get => Memory.ReadMemory(Address + 0x600); + set => Memory.WriteMemory(Address + 0x600, value); + } + + public float CabinAir_AbsHum + { + get => Memory.ReadMemory(Address + 0x604); + set => Memory.WriteMemory(Address + 0x604, value); + } + + public D3DVector A_Trans + { + get => Memory.ReadMemory(Address + 0x608); + set => Memory.WriteMemory(Address + 0x608, value); + } + + public D3DVector A_Rot + { + get => Memory.ReadMemory(Address + 0x614); + set => Memory.WriteMemory(Address + 0x614, value); + } + + public OmsiCamera OutsideCamera => new(Memory, Memory.ReadMemory(Address + 0x620)); + + public bool PAI + { + get => Memory.ReadMemory(Address + 0x624); + set => Memory.WriteMemory(Address + 0x624, value); + } + + //TODO: A whole buch of AI fields and some other fields } } \ No newline at end of file diff --git a/OmsiHookPlugin/OmsiHookPlugin.cs b/OmsiHookPlugin/OmsiHookPlugin.cs index 80710db..aeaf11f 100644 --- a/OmsiHookPlugin/OmsiHookPlugin.cs +++ b/OmsiHookPlugin/OmsiHookPlugin.cs @@ -23,7 +23,7 @@ public static void PluginStart(IntPtr aOwner) Log("PluginStart()"); Log("Loading OmsiHook..."); hook = new(); - hook.AttachToOMSI(); + _ = hook.AttachToOMSI(); Log("Didn't crash!"); } From ff32d85638c1bb5602e19983fa14d737a4e59af5 Mon Sep 17 00:00:00 2001 From: Thomas Mathieson Date: Tue, 3 May 2022 01:17:16 +0100 Subject: [PATCH 2/3] * Syntax error --- OmsiHook/OmsiPartikelemitter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OmsiHook/OmsiPartikelemitter.cs b/OmsiHook/OmsiPartikelemitter.cs index 1543b4e..19ea30f 100644 --- a/OmsiHook/OmsiPartikelemitter.cs +++ b/OmsiHook/OmsiPartikelemitter.cs @@ -106,7 +106,7 @@ public bool Spotlight_Calc get => Memory.ReadMemory(Address + 0x60); set => Memory.WriteMemory(Address + 0x60, value); } - public OmsiPartikel[] Partikel => Memory.ReadMemoryObjArray(Address + 0x64); + public OmsiPartikel[] Partikel => Memory.ReadMemoryObjArray(Address + 0x64); public int Textur { get => Memory.ReadMemory(Address + 0x68); From 37d36b0f715ebc16ea5aaed60d25e7396f213737 Mon Sep 17 00:00:00 2001 From: Thomas Mathieson Date: Tue, 3 May 2022 18:18:31 +0100 Subject: [PATCH 3/3] * Continued experiments --- OmsiExtensionsCLI/Program.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/OmsiExtensionsCLI/Program.cs b/OmsiExtensionsCLI/Program.cs index eba5347..a3277cc 100644 --- a/OmsiExtensionsCLI/Program.cs +++ b/OmsiExtensionsCLI/Program.cs @@ -30,9 +30,10 @@ static void Main(string[] args) Console.WriteLine($"Read data: ax:{posa._30:F3} ay:{posa._31:F3} az:{posa._32:F3}".PadRight(Console.WindowWidth-1)); Console.WriteLine($"Read data: map:{map.Name} path:{map.Filename} friendly:{map.FriendlyName}".PadRight(Console.WindowWidth-1)); + Console.WriteLine($"{omsi.PlayerVehicle.PAI_LastBrake} {omsi.PlayerVehicle.Bremspedal}".PadRight(Console.WindowWidth - 1)); Console.WriteLine("".PadRight(Console.WindowWidth-1)); - omsi.PlayerVehicle.Velocity = new D3DVector { x=0, y=0, z=5 }; - var b = omsi.PlayerVehicle.PAI_LastBrake; + //omsi.PlayerVehicle.Velocity = new D3DVector { x=0, y=0, z=5 }; + //omsi.PlayerVehicle.Bremspedal = 0; Thread.Sleep(50); }