Skip to content

Commit

Permalink
A hotfix to capture physics options.
Browse files Browse the repository at this point in the history
  • Loading branch information
TheIronWolfModding committed Feb 21, 2018
1 parent 1f2d511 commit 1c9cd27
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Include/rFactor2SharedMemoryMap.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Website: thecrewchief.org

// Each component can be in [0:99] range.
#define PLUGIN_VERSION_MAJOR "3.0"
#define PLUGIN_VERSION_MINOR "0.0"
#define PLUGIN_VERSION_MINOR "0.1"
#define PLUGIN_NAME_AND_VERSION "rFactor 2 Shared Memory Map Plugin - v" PLUGIN_VERSION_MAJOR
#define SHARED_MEMORY_VERSION PLUGIN_VERSION_MAJOR "." PLUGIN_VERSION_MINOR

Expand Down
2 changes: 1 addition & 1 deletion Monitor/rF2SMMonitor/rF2SMMonitor/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ void View_Paint(object sender, PaintEventArgs e)
float yStep = SystemFonts.DefaultFont.Height;
var gameStateText = new StringBuilder();
gameStateText.Append(
$"Plugin Version: Expected: 3.0.0.0 64bit Actual: {MainForm.GetStringFromBytes(this.extended.mVersion)} {(this.extended.is64bit == 1 ? "64bit" : "32bit")} {(this.extended.mHostedPluginVars.StockCarRules_IsHosted == 1 ? "SCR Plugin Hosted" : "")} FPS: {this.fps}");
$"Plugin Version: Expected: 3.0.0.1 64bit Actual: {MainForm.GetStringFromBytes(this.extended.mVersion)} {(this.extended.is64bit == 1 ? "64bit" : "32bit")} {(this.extended.mHostedPluginVars.StockCarRules_IsHosted == 1 ? "SCR Plugin Hosted" : "")} FPS: {this.fps}");

// Draw header
g.DrawString(gameStateText.ToString(), SystemFonts.DefaultFont, brush, currX, currY);
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ If you would like to support this project, you can donate [here.](http://thecrew

# Release history

02/16/2018 - v3.0.0.1

Hotfix for physics options not being captured.

02/16/2018 - v3.0.0.0

Rework Plugin to replace mutexes with buffer version tracking mechanism. Update Monitor to match new way of reading data.
Expand Down
2 changes: 2 additions & 0 deletions Source/rFactor2SharedMemoryMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -913,6 +913,8 @@ void SharedMemoryPlugin::SetPhysicsOptions(PhysicsOptionsV01& options)

DEBUG_MSG(DebugLevel::Timing, "PHYSICS - Updated.");

memcpy(&(mExtStateTracker.mExtended.mPhysics), &options, sizeof(rF2PhysicsOptions));

mExtended.BeginUpdate();
memcpy(mExtended.mpBuff, &(mExtStateTracker.mExtended), sizeof(rF2Extended));
mExtended.EndUpdate();
Expand Down

0 comments on commit 1c9cd27

Please sign in to comment.