Fix issues after the last GC update

This commit is contained in:
Norbi Peti 2020-01-15 21:19:38 +01:00
parent a2c3709c23
commit 56af8ecd2c
No known key found for this signature in database
GPG key ID: DBA4C4549A927E56
3 changed files with 9 additions and 3 deletions

View file

@ -6,6 +6,7 @@ using Unity.Entities;
using RobocraftX; using RobocraftX;
using RobocraftX.GUI.CommandLine; using RobocraftX.GUI.CommandLine;
using RobocraftX.Multiplayer; using RobocraftX.Multiplayer;
using RobocraftX.StateSync;
using Svelto.ECS; using Svelto.ECS;
using Svelto.Context; using Svelto.Context;
@ -43,10 +44,12 @@ namespace ExtraCommands
static MethodBase TargetMethod(HarmonyInstance instance) static MethodBase TargetMethod(HarmonyInstance instance)
{ {
return _ComposeMethodInfo(CommandLineCompositionRoot.Compose<UnityContext<FullGameCompositionRoot>>); return _ComposeMethodInfo(CommandLineCompositionRoot.Compose);
} }
private static MethodInfo _ComposeMethodInfo(Action<UnityContext<FullGameCompositionRoot>, EnginesRoot, World, Action, MultiplayerInitParameters> a) private delegate void ComposeAction(UnityContext<FullGameCompositionRoot> c, EnginesRoot r, World w, Action a,
MultiplayerInitParameters mip, ref StateSyncRegistrationHelper ssrh); //Ref params can't be used with Actions
private static MethodInfo _ComposeMethodInfo(ComposeAction a)
{ {
return a.Method; return a.Method;
} }

View file

@ -55,6 +55,9 @@
<Reference Include="RobocraftX.Physics"> <Reference Include="RobocraftX.Physics">
<HintPath>..\ref\RobocraftX.Physics.dll</HintPath> <HintPath>..\ref\RobocraftX.Physics.dll</HintPath>
</Reference> </Reference>
<Reference Include="RobocraftX.Services, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\ref\RobocraftX.Services.dll</HintPath>
</Reference>
<Reference Include="RobocraftX.StateSync"> <Reference Include="RobocraftX.StateSync">
<HintPath>..\ref\RobocraftX.StateSync.dll</HintPath> <HintPath>..\ref\RobocraftX.StateSync.dll</HintPath>
</Reference> </Reference>

View file

@ -151,7 +151,7 @@ namespace ExtraCommands.Building
//GridConnectionsEntityStruct[] blockConnections; //GridConnectionsEntityStruct[] blockConnections;
//MachineGraphConnectionEntityStruct[] connections; //MachineGraphConnectionEntityStruct[] connections;
Svelto.DataStructures.FasterList<uint> cubesToMove = new Svelto.DataStructures.FasterList<uint>(); Gamecraft.DataStructures.FasterList<uint> cubesToMove = new Gamecraft.DataStructures.FasterList<uint>();
ConnectedCubesUtility.TreeTraversal.GetConnectedCubes(entitiesDB, blockID, cubeStack, cubesToMove, (in GridConnectionsEntityStruct g) => { return false; }); ConnectedCubesUtility.TreeTraversal.GetConnectedCubes(entitiesDB, blockID, cubeStack, cubesToMove, (in GridConnectionsEntityStruct g) => { return false; });
for(int i = 0; i < cubesToMove.Count; i++) { for(int i = 0; i < cubesToMove.Count; i++) {
TranslateSingleBlock(cubesToMove[i], translationVector); TranslateSingleBlock(cubesToMove[i], translationVector);