@@ -14,7 +14,7 @@ namespace NetcodePatcher
1414{
1515 public static class Patcher
1616 {
17-
17+ public const string NetcodePatcherVersion = "2.2.0" ;
1818 public static void Main ( string [ ] args )
1919 {
2020 // check if enough args, otherwise print usage
@@ -111,7 +111,7 @@ public void LogInfo(string message)
111111
112112 public static void Patch ( string pluginPath , string managedPath )
113113 {
114- Patcher . Logger . LogMessage ( "Initializing NetcodePatcher" ) ;
114+ Patcher . Logger . LogMessage ( $ "Initializing NetcodePatcher { NetcodePatcherVersion } ") ;
115115 HashSet < string > hashSet = new HashSet < string > ( ) ;
116116 List < string > references = new List < string > ( )
117117 {
@@ -127,9 +127,21 @@ public static void Patch(string pluginPath, string managedPath)
127127 "UnityEngine.CoreModule" ,
128128 "Unity.Netcode.Components" ,
129129 "Unity.Networking.Transport" ,
130- "Assembly-CSharp"
130+ "Assembly-CSharp" ,
131+ "ClientNetworkTransform"
131132 } ;
132133
134+ // remove files with _original.dll and _original.pdb in pluginPath
135+ foreach ( string text in Directory . GetFiles ( pluginPath , "*.*" , SearchOption . AllDirectories ) )
136+ {
137+ string fileName = Path . GetFileName ( text ) ;
138+ if ( fileName . ToLower ( ) . Contains ( "_original" ) )
139+ {
140+ Patcher . Logger . LogMessage ( "Deleting : " + fileName ) ;
141+ File . Delete ( text ) ;
142+ }
143+ }
144+
133145 foreach ( string text3 in Directory . GetFiles ( pluginPath , "*.dll" , SearchOption . AllDirectories ) )
134146 {
135147 string fileName = Path . GetFileName ( text3 ) ;
@@ -157,7 +169,7 @@ public static void Patch(string pluginPath, string managedPath)
157169 }
158170 }
159171
160- if ( skip )
172+ if ( skip || hashSet . Contains ( text3 ) )
161173 {
162174 break ;
163175 }
0 commit comments