Remove debug code

This commit is contained in:
Norbi Peti 2021-05-18 00:46:47 +02:00
parent bba56a1967
commit 415012d425
No known key found for this signature in database
GPG key ID: DBA4C4549A927E56

View file

@ -95,7 +95,6 @@ namespace GCMC
}); });
Log.Output("Placing blocks..."); Log.Output("Placing blocks...");
int i; int i;
Block lastBlock = null;
for (i = 0; i < blocksArray.Length; i++) for (i = 0; i < blocksArray.Length; i++)
{ {
var blocks = blocksArray[i]; var blocks = blocksArray[i];
@ -110,15 +109,10 @@ namespace GCMC
var block = new Block(type.Type, (blocks.Start + blocks.End) / 10 * 3 + new float3(5000, 0, 5000)) var block = new Block(type.Type, (blocks.Start + blocks.End) / 10 * 3 + new float3(5000, 0, 5000))
{ {
Color = type.Color, Color = type.Color,
//Scale = (blocks.End - blocks.Start + 1) * 3 Scale = (blocks.End - blocks.Start + 1) * 3
}; };
Console.WriteLine("Placed block at " + block.Position);
lastBlock = block;
} }
if (lastBlock != null)
Game.Simulate += (sender, args) => OnSimulationStarted(lastBlock).RunOn(Scheduler.extraLeanRunner);
Log.Output(i + " blocks placed."); Log.Output(i + " blocks placed.");
} }
catch (Exception e) catch (Exception e)
@ -128,19 +122,6 @@ namespace GCMC
} }
} }
private IEnumerator OnSimulationStarted(Block lastBlock)
{
SimBody body;
int C = 0;
while ((body = lastBlock.GetSimBody()) == null)
{
C++;
yield return null;
}
Console.WriteLine($"Body position: {body.Position} ({C})");
}
public override void OnApplicationStart() public override void OnApplicationStart()
{ {
TechbloxModdingAPI.Main.Init(); TechbloxModdingAPI.Main.Init();