Skip to content

Commit

Permalink
Merge branch 'master' into windows_compile_fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hhyyrylainen authored Feb 18, 2019
2 parents 4deea38 + 91ef435 commit e7d7ac0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions scripts/microbe_stage/setup.as
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ void onReturnFromEditor(CellStageWorld@ world)

// Spawn another cell from the player species
SpeciesComponent@ ourActualSpecies = MicrobeOperations::getSpeciesComponent(world, player);
auto membraneComponent = world.GetComponent_MembraneComponent(player);

// Call this before creating the clone.
Species::initProcessorComponent(world, player, ourActualSpecies);
Expand All @@ -239,6 +240,12 @@ void onReturnFromEditor(CellStageWorld@ world)
Species::copyProcessesFromSpecies(world, ourActualSpecies, player);

PlayerSpeciesSpawner factory("Default");

// Offset between cells
pos._Position.X += membraneComponent.calculateEncompassingCircleRadius();
pos._Position.Z += membraneComponent.calculateEncompassingCircleRadius();
pos.Marked = true;

auto spawned = factory.factorySpawn(world, pos._Position);

LOG_WRITE("TODO: the spawned cell from the player species from the editor split will "
Expand Down

0 comments on commit e7d7ac0

Please sign in to comment.