Skip to content

Commit 81553aa

Browse files
Merge branch '1.19.2/main' into 1.20.1/main
2 parents 5aaacc4 + 9935792 commit 81553aa

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

changelogs/1.5.4-beta.1.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Additions
22
* Allow floaters and balloons on non eureka ships to function. [95eabc9](https://github.com/ValkyrienSkies/Eureka/commit/95eabc914f2463bec933ae00f196dcd70152d197)
3-
* Added config `AllowFloatersAndBalloonsOnNonEurekaShips` default value true.
4-
* Added config `PassiveBallonMinHeight` default value 64.
5-
* Added config `PassiveBallonMaxHeight ` default value 400.
3+
* Added config `allowFloatersAndBalloonsOnNonEurekaShips` default value true.
4+
* Added config `passiveBalloonMinHeight` default value 64.
5+
* Added config `passiveBalloonMaxHeight ` default value 400.
66
# Changes
77
* Remove duplicate linearBaseSpeed config. [13c5899](https://github.com/ValkyrienSkies/Eureka/commit/13c5899e305346046a293e82a852e95934038b59)
88
* `baseSpeed` was removed.

common/src/main/kotlin/org/valkyrienskies/eureka/EurekaConfig.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,13 @@ object EurekaConfig {
9292
var elevationSnappiness = 1.0
9393

9494
@JsonSchema(description = "Allows ships without a helm (passive ships) to use floaters and balloons")
95-
var AllowFloatersAndBalloonsOnNonEurekaShips = true
95+
var allowFloatersAndBalloonsOnNonEurekaShips = true
9696

9797
@JsonSchema(description = "The height where balloons starts to loose effectiveness on ships without a helm")
98-
var PassiveBallonMinHeight = 64.0
98+
var passiveBalloonMinHeight = 64.0
9999

100100
@JsonSchema(description = "The height where balloons effectiveness is zero on ships without a helm")
101-
var PassiveBallonMaxHeight = 400.0
101+
var passiveBalloonMaxHeight = 400.0
102102

103103
// Allow Eureka controlled ships to be affected by fluid drag
104104
@JsonSchema(description = "Allow Eureka controlled ships to be affected by fluid drag")

common/src/main/kotlin/org/valkyrienskies/eureka/ship/EurekaShipControl.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,14 @@ class EurekaShipControl : ShipForcesInducer, ServerTickListener {
8787
// Enable fluid drag if all the helms have been destroyed
8888
physShip.doFluidDrag = true
8989

90-
if (EurekaConfig.SERVER.AllowFloatersAndBalloonsOnNonEurekaShips) {
90+
if (EurekaConfig.SERVER.allowFloatersAndBalloonsOnNonEurekaShips) {
9191
val mass = physShip.mass
9292
val velY = physShip.velocity.y()
9393

9494
var balloonForce = getBalloonForce()
9595
// balloon force 100% at y 100, 0% at y 320
9696
// the "velY * 10" reduces bobbing by sampling the height position in the future
97-
balloonForce *= 1 - Math.clamp(0.0, 1.0, (physShip.transform.positionInWorld.y() + velY * 10 - EurekaConfig.SERVER.PassiveBallonMinHeight) / (EurekaConfig.SERVER.PassiveBallonMaxHeight - EurekaConfig.SERVER.PassiveBallonMinHeight))
97+
balloonForce *= 1 - Math.clamp(0.0, 1.0, (physShip.transform.positionInWorld.y() + velY * 10 - EurekaConfig.SERVER.passiveBalloonMinHeight) / (EurekaConfig.SERVER.passiveBalloonMaxHeight - EurekaConfig.SERVER.passiveBalloonMinHeight))
9898
balloonForce = min(balloonForce, max(getIdealUpwardForce(EurekaConfig.SERVER.balloonElevationMaxSpeed, velY, mass), 0.0))
9999
physShip.applyInvariantForce(Vector3d(0.0, balloonForce, 0.0))
100100

0 commit comments

Comments
 (0)