another wip

This commit is contained in:
minjaesong
2024-07-21 11:46:59 +09:00
parent 85c6b87cea
commit 082e1b7ec0
3 changed files with 11 additions and 13 deletions

View File

@@ -866,7 +866,6 @@ object IngameRenderer : Disposable {
}
private val bodyFriction = BlockCodex[Block.AIR].friction.frictionToMult()
private val bodyViscosity = FluidCodex[Block.AIR].viscosity.viscosityToMult()
private fun applyGravitation(gravitation: Vector2, hitboxWidth: Double) {
@@ -877,8 +876,7 @@ object IngameRenderer : Disposable {
private fun Int.viscosityToMult(): Double = 16.0 / (16.0 + this)
private fun applyForce(acc: Vector2) {
val speedMultByTile = bodyViscosity
externalV += acc * speedMultByTile
externalV += acc
}
private fun getDrag(externalForce: Vector2, gravitation: Vector2, hitboxWidth: Double): Vector2 {

View File

@@ -499,7 +499,7 @@ open class ActorHumanoid : ActorWithBody, Controllable, Pocketed, Factionable, L
else {
isWalkingH = true
readonly_totalX =
readonly_totalX = speedMultByTile *
if (absAxisVal == AXIS_KEYBOARD)
avAcceleration * applyVelo(walkCounterX) * (if (left) -1f else 1f)
else