walk anim speed adjusted

This commit is contained in:
minjaesong
2022-01-11 22:14:44 +09:00
parent dc595fdd51
commit 03a06773c4
4 changed files with 3 additions and 7 deletions

View File

@@ -37,7 +37,7 @@ SKELETON_STAND=HEADGEAR 0,78;\
! When you move the arms/hands, make sure you move the HELD_ITEM as well
# RUNNING might need its own skeleton...
ANIM_RUN=DELAY 0.16;ROW 2;SKELETON SKELETON_STAND
ANIM_RUN=DELAY 0.18;ROW 2;SKELETON SKELETON_STAND
ANIM_RUN_1=LEG_REST_RIGHT 2,2;LEG_REST_LEFT -2,0;TAIL_0 1,0;TORSO_1 0,-999
ANIM_RUN_2=ALL 0,2;LEG_REST_RIGHT 0,-2;LEG_REST_LEFT 0,2;TAIL_0 -1,0;TORSO_1 0,-999
ANIM_RUN_3=LEG_REST_RIGHT -2,0;LEG_REST_LEFT 2,2;TAIL_0 -1,0;TORSO_1 0,-999

View File

@@ -37,7 +37,7 @@ SKELETON_STAND=HEADGEAR 0,78;\
! When you move the arms/hands, make sure you move the HELD_ITEM as well
# RUNNING might need its own skeleton...
ANIM_RUN=DELAY 0.16;ROW 2;SKELETON SKELETON_STAND
ANIM_RUN=DELAY 0.18;ROW 2;SKELETON SKELETON_STAND
ANIM_RUN_1=LEG_REST_RIGHT 2,2;LEG_REST_LEFT -2,0;TAIL_0 1,0;TORSO_1 0,-999
ANIM_RUN_2=ALL 0,2;LEG_REST_RIGHT 0,-2;LEG_REST_LEFT 0,2;TAIL_0 -1,0;TORSO_1 0,-999
ANIM_RUN_3=LEG_REST_RIGHT -2,0;LEG_REST_LEFT 2,2;TAIL_0 -1,0;TORSO_1 0,-999

View File

@@ -709,7 +709,7 @@ open class ActorHumanoid : ActorWithBody, Controllable, Pocketed, Factionable, L
if (this is HasAssembledSprite) {
try {
val baseDelay = animDesc!!.getAnimByFrameName("ANIM_RUN").delay
val moveSpeedMult = (controllerV?.x ?: 0.0).abs().coerceAtLeast(PHYS_EPSILON_VELO).toFloat() / 4f // FIXME empirical value
val moveSpeedMult = (controllerV?.x ?: 0.0).abs().coerceAtLeast(PHYS_EPSILON_VELO).toFloat() / 1.414f // FIXME empirical value
val stride = scale.toFloat()
val maxMoveSpeed = scale.sqrt().toFloat() // ActorWithBody uses scale.sqrt() for determining walk acceleration
val scaleCompensation = stride / maxMoveSpeed

View File

@@ -3,11 +3,9 @@ package net.torvald.terrarum.modulebasegame.ui
import com.badlogic.gdx.graphics.Camera
import com.badlogic.gdx.graphics.Color
import com.badlogic.gdx.graphics.g2d.SpriteBatch
import net.torvald.random.HQRNG
import net.torvald.terrarum.App
import net.torvald.terrarum.Second
import net.torvald.terrarum.Terrarum
import net.torvald.terrarum.console.Echo
import net.torvald.terrarum.gameactors.AVKey
import net.torvald.terrarum.langpack.Lang
import net.torvald.terrarum.modulebasegame.gameactors.PlayerBuilderTestSubject1
@@ -17,8 +15,6 @@ import net.torvald.terrarum.savegame.VirtualDisk
import net.torvald.terrarum.serialise.Common
import net.torvald.terrarum.serialise.LoadSavegame
import net.torvald.terrarum.serialise.WritePlayer
import net.torvald.terrarum.serialise.WriteSavegame
import net.torvald.terrarum.toInt
import net.torvald.terrarum.ui.*
import net.torvald.terrarum.utils.RandomWordsName