reducing jump power for actors with scale > 1

This commit is contained in:
minjaesong
2021-10-05 20:50:05 +09:00
parent 59aa595a0e
commit 3364cbb49e
3 changed files with 3 additions and 5 deletions

View File

@@ -7,7 +7,7 @@ The main game directory is composed of following directories:
```
.Terrarum
+ Players
- <Player Name Here>, JSON.gz
- <Player Name Here>, TVDA { actor JSON, optional textures and sprite defs }
+ Shared
- <e.g. Disk GUID>, TEVD { * }
- <this directory can have anything>

View File

@@ -15,7 +15,7 @@
"vertstride": 40,
"jumppower": 19.0,
"jumppower": 17.6,
"jumppowermult": [100,100,100,100,100,100,100],
"scale": 1.0,

View File

@@ -522,7 +522,7 @@ open class ActorHumanoid : ActorWithBody, Controllable, Pocketed, Factionable, L
}
private fun getJumpAcc(pwr: Double, timedJumpCharge: Double): Double {
return pwr * timedJumpCharge * JUMP_ACCELERATION_MOD * Math.sqrt(scale) // positive value
return pwr * timedJumpCharge * JUMP_ACCELERATION_MOD * Math.pow(scale, 0.25) // positive value
}
@Transient private var oldMAX_JUMP_LENGTH = -1 // init
@@ -594,8 +594,6 @@ open class ActorHumanoid : ActorWithBody, Controllable, Pocketed, Factionable, L
/**
* See ./work_files/Jump power by pressing time.gcx
*
* TODO linear function (play Super Mario Bros. and you'll get what I'm talking about) -- SCRATCH THAT!
*/
private fun jump() {
if (jumping) {// && jumpable) {