@@ -289,7 +289,7 @@ class EurekaShipControl : ShipForcesInducer, ServerTickListener {
289
289
// Player controlled forward and backward thrust
290
290
private fun getPlayerForwardVel (control : ControlData , physShip : PhysShipImpl ): Vector3d {
291
291
292
- val mass10 = physShip.inertia.shipMass * 10
292
+ val scaledMass = physShip.inertia.shipMass * EurekaConfig . SERVER .speedMassScale
293
293
val vel: Vector3dc = physShip.poseVel.vel
294
294
295
295
// region Player controlled forward and backward thrust
@@ -311,7 +311,7 @@ class EurekaShipControl : ShipForcesInducer, ServerTickListener {
311
311
312
312
// This is the speed that the ship is always allowed to go out, without engines
313
313
val baseForwardVel = Vector3d (forwardVector).mul(EurekaConfig .SERVER .baseSpeed)
314
- val forwardForce = Vector3d (baseForwardVel).sub(velOrthogonalToPlayerUp).mul(mass10 )
314
+ val forwardForce = Vector3d (baseForwardVel).sub(velOrthogonalToPlayerUp).mul(scaledMass )
315
315
316
316
if (extraForceLinear != 0.0 ) {
317
317
// engine boost
@@ -320,7 +320,7 @@ class EurekaShipControl : ShipForcesInducer, ServerTickListener {
320
320
321
321
// This is the maximum speed we want to go in any scenario (when not sprinting)
322
322
val idealForwardVel = Vector3d (forwardVector).mul(EurekaConfig .SERVER .maxCasualSpeed)
323
- val idealForwardForce = Vector3d (idealForwardVel).sub(velOrthogonalToPlayerUp).mul(mass10 )
323
+ val idealForwardForce = Vector3d (idealForwardVel).sub(velOrthogonalToPlayerUp).mul(scaledMass )
324
324
325
325
val extraForceNeeded = Vector3d (idealForwardForce).sub(forwardForce)
326
326
forwardForce.fma(min(extraForceLinear / extraForceNeeded.length(), 1.0 ), extraForceNeeded)
0 commit comments