mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-14 04:24:05 +09:00
reducing jump power for actors with scale > 1
This commit is contained in:
@@ -7,7 +7,7 @@ The main game directory is composed of following directories:
|
|||||||
```
|
```
|
||||||
.Terrarum
|
.Terrarum
|
||||||
+ Players
|
+ Players
|
||||||
- <Player Name Here>, JSON.gz
|
- <Player Name Here>, TVDA { actor JSON, optional textures and sprite defs }
|
||||||
+ Shared
|
+ Shared
|
||||||
- <e.g. Disk GUID>, TEVD { * }
|
- <e.g. Disk GUID>, TEVD { * }
|
||||||
- <this directory can have anything>
|
- <this directory can have anything>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
"vertstride": 40,
|
"vertstride": 40,
|
||||||
|
|
||||||
"jumppower": 19.0,
|
"jumppower": 17.6,
|
||||||
"jumppowermult": [100,100,100,100,100,100,100],
|
"jumppowermult": [100,100,100,100,100,100,100],
|
||||||
|
|
||||||
"scale": 1.0,
|
"scale": 1.0,
|
||||||
|
|||||||
@@ -522,7 +522,7 @@ open class ActorHumanoid : ActorWithBody, Controllable, Pocketed, Factionable, L
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun getJumpAcc(pwr: Double, timedJumpCharge: Double): Double {
|
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
|
@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
|
* 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() {
|
private fun jump() {
|
||||||
if (jumping) {// && jumpable) {
|
if (jumping) {// && jumpable) {
|
||||||
|
|||||||
Reference in New Issue
Block a user