Skip to content

Commit

Permalink
Added stun threshold from memory read
Browse files Browse the repository at this point in the history
  • Loading branch information
PC_volt authored and PC_volt committed Sep 9, 2024
1 parent c9371b5 commit 00d4953
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion App.config
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@

<add key="CharIndexOffset" value="0x44"/>
<add key="BlockstunOffset" value="0x4D54"/>
<add key="HitstunOffset" value="0x9808"/>
<add key="HPOffset" value="0x9CC"/>
<add key="AnimStringOffset" value="0x2444" />
<add key="StunOffset" value="0x9FC4"/>
<add key="StunThresholdOffset" value="0x9FC8"/>
<add key="RISCOffset" value="0x24E30"/>
<add key="MeterOffset" value="0x2D134"/>
<add key="PositionXOffset" value="0x24C"/>
Expand Down
2 changes: 2 additions & 0 deletions Labtool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ public void updateFrameInfo()
_player2._RISC = MemoryAccessor.ReadInfoInt(ref _player2, MemoryAccessor._RISCOffset);
_player1._stun = MemoryAccessor.ReadInfoInt(ref _player1, MemoryAccessor._StunOffset);
_player2._stun = MemoryAccessor.ReadInfoInt(ref _player2, MemoryAccessor._StunOffset);
_player1._stunThreshold = MemoryAccessor.ReadInfoInt(ref _player1, MemoryAccessor._StunThresholdOffset);
_player2._stunThreshold = MemoryAccessor.ReadInfoInt(ref _player2, MemoryAccessor._StunThresholdOffset);

_player1._pos.x = MemoryAccessor.ReadInfoInt(ref _player1, MemoryAccessor._PositionXOffset);
_player1._pos.y = MemoryAccessor.ReadInfoInt(ref _player1, MemoryAccessor._PositionYOffset);
Expand Down
4 changes: 2 additions & 2 deletions MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ private void refreshInfo()

updateLabel(this.p1DefModifLabel, "[x" + _labtool._player1.getDefenseModifier() + "]");
updateLabel(this.p2DefModifLabel, "[x" + _labtool._player2.getDefenseModifier() + "]");
updateLabel(this.p1StunLabel, "" + _labtool._player1._stun + "/" + Player.stunList[_labtool._player1.characterIndex]);
updateLabel(this.p2StunLabel, "" + _labtool._player2._stun + "/" + Player.stunList[_labtool._player2.characterIndex]);
updateLabel(this.p1StunLabel, "" + _labtool._player1._stun + "/" + _labtool._player1._stunThreshold * 100);
updateLabel(this.p2StunLabel, "" + _labtool._player2._stun + "/" + _labtool._player2._stunThreshold * 100);
updateLabel(this.p1GutsLabel, "(x guts)");
updateLabel(this.p2GutsLabel, "(x guts)");
}
Expand Down
1 change: 1 addition & 0 deletions MemoryAccessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class MemoryAccessor
public static readonly int _PositionYOffset = Convert.ToInt32(ConfigurationManager.AppSettings.Get("PositionYOffset"), 16);
public static readonly int _AnimStringOffset = Convert.ToInt32(ConfigurationManager.AppSettings.Get("AnimStringOffset"), 16);
public static readonly int _StunOffset = Convert.ToInt32(ConfigurationManager.AppSettings.Get("StunOffset"), 16);
public static readonly int _StunThresholdOffset = Convert.ToInt32(ConfigurationManager.AppSettings.Get("StunThresholdOffset"), 16);

public static readonly int _BlockstunOffset = Convert.ToInt32(ConfigurationManager.AppSettings.Get("BlockstunOffset"), 16);
public static readonly int _HitstunOffset = Convert.ToInt32(ConfigurationManager.AppSettings.Get("HitstunOffset"), 16);
Expand Down
1 change: 1 addition & 0 deletions Player.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class Player
public int _meter;
public int _RISC;
public int _stun;
public int _stunThreshold;
public bool _isBlocking = false;
public bool _isHit = false;
public int _hitstop;
Expand Down

0 comments on commit 00d4953

Please sign in to comment.