mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-15 10:25:06 -04:00
rendering: add support for noclip movement
This commit is contained in:
parent
5124b7b8f2
commit
ae0efeafed
@ -19,4 +19,5 @@ data class CameraGameConfig(
|
||||
@Json(name = "render_distance") var renderDistance: Int = 10,
|
||||
var fov: Float = 60f,
|
||||
@Json(name = "mouse_sensitivity") var moseSensitivity: Float = 0.1f,
|
||||
@Json(name = "no_clip_movement") var noCipMovement: Boolean = false,
|
||||
)
|
||||
|
@ -145,8 +145,10 @@ class Camera(
|
||||
fun handleInput(deltaTime: Double) {
|
||||
var cameraSpeed = movementSpeed * deltaTime
|
||||
val movementFront = Vec3(cameraFront)
|
||||
movementFront.y = 0.0f
|
||||
movementFront.normalizeAssign() // when moving forwards, do not move down
|
||||
if (! Minosoft.getConfig().config.game.camera.noCipMovement) {
|
||||
movementFront.y = 0.0f
|
||||
movementFront.normalizeAssign() // when moving forwards, do not move down
|
||||
}
|
||||
if (keySprintDown) {
|
||||
cameraSpeed *= 5
|
||||
}
|
||||
|
@ -211,10 +211,10 @@ class FluidRenderer(
|
||||
if (blockState == null) {
|
||||
return false
|
||||
}
|
||||
if (blockState.owner.resourceLocation.full.contains(regex)) {
|
||||
if (blockState.properties[BlockProperties.WATERLOGGED] == true) {
|
||||
return true
|
||||
}
|
||||
if (blockState.properties[BlockProperties.WATERLOGGED] == true) {
|
||||
if (blockState.owner.resourceLocation.full.contains(regex)) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
|
Loading…
x
Reference in New Issue
Block a user