Skip to content

Commit

Permalink
Improved speed calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
Untrustedlife committed Dec 17, 2018
1 parent 751a95a commit 1664229
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/microbe_stage/microbe_editor/microbe_editor.as
Original file line number Diff line number Diff line change
Expand Up @@ -900,11 +900,12 @@ class MicrobeEditor{
auto organelle = cast<PlacedOrganelle>(editedMicrobe[i]);
auto name = organelle.organelle.name;
if (name=="flagellum"){
flagCount++;
flagCount++;
}
}
//This is complex, i Know
finalSpeed= CELL_BASE_THRUST+((flagCount/lengthMicrobe)*FLAGELLA_BASE_FORCE)-(CELL_DRAG_MULTIPLIER+(CELL_SIZE_DRAG_MULTIPLIER*lengthMicrobe));
//LOG_INFO(""+flagCount);
finalSpeed= ((CELL_BASE_THRUST+((flagCount/4)*FLAGELLA_BASE_FORCE))-(abs(CELL_DRAG_MULTIPLIER)+(abs(CELL_SIZE_DRAG_MULTIPLIER)*lengthMicrobe)));
return finalSpeed;
}
// Maybe i should do this in the non-editor code instead, to make sure its more decoupled from the player
Expand Down

0 comments on commit 1664229

Please sign in to comment.