From 1664229bfe68c3e489bc8c45fa151c52dafb9f8d Mon Sep 17 00:00:00 2001 From: Untrustedlife Date: Sun, 16 Dec 2018 20:22:28 -0600 Subject: [PATCH] Improved speed calculation --- scripts/microbe_stage/microbe_editor/microbe_editor.as | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/microbe_stage/microbe_editor/microbe_editor.as b/scripts/microbe_stage/microbe_editor/microbe_editor.as index cfed404eebd..0516c7a2c47 100644 --- a/scripts/microbe_stage/microbe_editor/microbe_editor.as +++ b/scripts/microbe_stage/microbe_editor/microbe_editor.as @@ -900,11 +900,12 @@ class MicrobeEditor{ auto organelle = cast(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