File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Original file line number Diff line number Diff line change 33using System . Reflection ;
44using System . Reflection . Emit ;
55using HarmonyLib ;
6- using RevertPlayerHeightDetection ;
76
87namespace BeatTogether . Patches
98{
109 [ HarmonyPatch ( typeof ( PlayerHeightDetector ) , "LateUpdate" ) ]
1110 public static class LateUpdatePatch
1211 {
12+ private static FieldInfo _headPosToPlayerHeightOffset = typeof ( PlayerHeightDetector . InitData )
13+ . GetField ( "headPosToPlayerHeightOffset" , BindingFlags . Instance | BindingFlags . Public ) ;
1314 private static FieldInfo _computedPlayerHeight = typeof ( PlayerHeightDetector )
14- . GetField ( "_computedPlayerHeight" , BindingFlags . Instance | BindingFlags . NonPublic ) ;
15+ . GetField ( "_computedPlayerHeight" , BindingFlags . Instance | BindingFlags . NonPublic ) ;
1516
1617 static IEnumerable < CodeInstruction > Transpiler ( IEnumerable < CodeInstruction > instructions )
1718 {
18- if ( ! Plugin . Configuration . Enabled )
19- return instructions ;
20-
2119 var instructionList = instructions . ToList ( ) ;
2220 for ( var i = 0 ; i < instructionList . Count ; i ++ )
2321 {
24- if ( instructionList [ i ] . opcode == OpCodes . Ldc_R4 &&
25- instructionList [ i + 1 ] . opcode == OpCodes . Add )
22+ if ( instructionList [ i ] . opcode == OpCodes . Add &&
23+ instructionList [ i - 1 ] . LoadsField ( _headPosToPlayerHeightOffset ) )
2624 {
27- instructionList . RemoveRange ( i , 2 ) ;
25+ instructionList . RemoveRange ( i - 3 , 4 ) ;
2826 break ;
2927 }
3028 }
Original file line number Diff line number Diff line change 11using System . Reflection ;
22using HarmonyLib ;
33using IPA ;
4- using IPA . Config ;
5- using IPA . Config . Stores ;
6- using RevertPlayerHeightDetection . Configuration ;
74using IPALogger = IPA . Logging . Logger ;
85
96namespace RevertPlayerHeightDetection
@@ -15,16 +12,12 @@ public class Plugin
1512 private const string _harmonyId = "com.Python.RevertPlayerHeightDetection" ;
1613
1714 internal static Harmony Harmony { get ; private set ; }
18- internal static PluginConfiguration Configuration { get ; private set ; }
1915 internal static IPALogger Logger { get ; private set ; }
2016
2117 [ Init ]
22- public void Init (
23- IPALogger logger ,
24- Config config )
18+ public void Init ( IPALogger logger )
2519 {
2620 Harmony = new Harmony ( _harmonyId ) ;
27- Configuration = config . Generated < PluginConfiguration > ( ) ;
2821 Logger = logger ;
2922 }
3023
Original file line number Diff line number Diff line change 3232// You can specify all the values or you can default the Build and Revision Numbers
3333// by using the '*' as shown below:
3434// [assembly: AssemblyVersion("1.0.*")]
35- [ assembly: AssemblyVersion ( "1.0.0 " ) ]
36- [ assembly: AssemblyFileVersion ( "1.0.0 " ) ]
35+ [ assembly: AssemblyVersion ( "1.0.1 " ) ]
36+ [ assembly: AssemblyFileVersion ( "1.0.1 " ) ]
Original file line number Diff line number Diff line change 9898 <ItemGroup >
9999 <Compile Include =" Patches\PlayerHeightDetectorPatch.cs" />
100100 <Compile Include =" Plugin.cs" />
101- <Compile Include =" Configuration\PluginConfiguration.cs" />
102101 <Compile Include =" Properties\AssemblyInfo.cs" />
103102 </ItemGroup >
104103 <ItemGroup >
Original file line number Diff line number Diff line change 33 "id" : " RevertPlayerHeightDetection" ,
44 "name" : " RevertPlayerHeightDetection" ,
55 "author" : " Python" ,
6- "version" : " 1.0.0 " ,
6+ "version" : " 1.0.1 " ,
77 "description" : " Reverts the changes made to player height detection in 1.13.2." ,
8- "gameVersion" : " 1.13.2 " ,
8+ "gameVersion" : " 1.13.4 " ,
99 "dependsOn" : {
1010 "BSIPA" : " ^4.0.0"
1111 },
1212 "features" : []
13- }
13+ }
You can’t perform that action at this time.
0 commit comments