diff --git a/.idea/libraries/bytedeco_fftw.xml b/.idea/libraries/bytedeco_fftw.xml
deleted file mode 100644
index 5d28fc619..000000000
--- a/.idea/libraries/bytedeco_fftw.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/bytedeco_fftw_platform.xml b/.idea/libraries/bytedeco_fftw_platform.xml
deleted file mode 100644
index dec9cdbeb..000000000
--- a/.idea/libraries/bytedeco_fftw_platform.xml
+++ /dev/null
@@ -1,104 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/assets/mods/basegame/materials/materials.csv b/assets/mods/basegame/materials/materials.csv
index 582efc759..503f3d0cf 100644
--- a/assets/mods/basegame/materials/materials.csv
+++ b/assets/mods/basegame/materials/materials.csv
@@ -19,13 +19,13 @@ BRAS;315;1015;8530;3;1.00;120;5;120;1.0;brass
BRNZ;310;843;8770;3;1.20;75;5;120;1.0;bronze
TINN;220;350;7310;2;1.00;69;5;120;1.0;tin
ZINC;90;525;7140;2;1.00;116;5;120;1.0;zinc
-DIRT;1;1;1400;0.0;0.0;36;0;10;0.25;dirt
-SAND;1;1;2400;0.0;0.0;36;0;36;0.25;sand
-GRVL;1;1;2400;0.0;0.0;36;0;36;0.25;gravel
+DIRT;1;1;1400;0.0;0.0;36;0;10;0.0;dirt
+SAND;1;1;2400;0.0;0.0;36;0;36;0.0;sand
+GRVL;1;1;2400;0.0;0.0;36;0;36;0.0;gravel
PLST;1;1;1400;0.0;0.0;36;0;16;0.5;TODO plastic (polyethylene)
-GRSS;1;1;1400;0.0;0.0;36;0;10;-0.03;dirt
-AIIR;1;1;1;0.0;0.0;36;0;1;-0.03;air
-NULL;1;1;1;0.0;0.0;36;0;1;-0.03;air
+GRSS;1;1;1400;0.0;0.0;36;0;10;0.0;dirt
+AIIR;1;1;1;0.0;0.0;36;0;1;-0.2;air
+NULL;1;1;1;0.0;0.0;36;0;1;0.5;air
# idst: ID_STRING, ALL CAPS
#
diff --git a/src/net/torvald/terrarum/modulebasegame/TerrarumIngame.kt b/src/net/torvald/terrarum/modulebasegame/TerrarumIngame.kt
index f0fbe068e..9e276bd86 100644
--- a/src/net/torvald/terrarum/modulebasegame/TerrarumIngame.kt
+++ b/src/net/torvald/terrarum/modulebasegame/TerrarumIngame.kt
@@ -64,7 +64,9 @@ import org.khelekore.prtree.PRTree
import java.io.File
import java.util.*
import java.util.logging.Level
+import kotlin.math.absoluteValue
import kotlin.math.min
+import kotlin.math.pow
import kotlin.math.roundToInt
@@ -302,7 +304,7 @@ open class TerrarumIngame(batch: FlippingSpriteBatch) : IngameInstance(batch) {
TileSurvey.submitProposal(
TileSurvey.SurveyProposal(
- "basegame.Ingame.audioReflection", 72, 48, 2, 4
+ "basegame.Ingame.audioReflection", 73, 73, 2, 4
) { world, x, y ->
val tileProp = BlockCodex[world.getTileFromTerrain(x, y)]
val wallProp = BlockCodex[world.getTileFromWall(x, y)]
@@ -885,10 +887,17 @@ open class TerrarumIngame(batch: FlippingSpriteBatch) : IngameInstance(batch) {
oldPlayerX = actorNowPlaying?.hitbox?.canonicalX ?: 0.0
// update audio mixer
- val ratio = (TileSurvey.getRatio("basegame.Ingame.audioReflection") ?: 0.0).coerceIn(0.0, 1.0)
- AudioMixer.convolveBusCave.volume = ratio
- AudioMixer.convolveBusOpen.volume = 1.0 - ratio
-
+ val ratio = (TileSurvey.getRatio("basegame.Ingame.audioReflection") ?: 0.0)
+ if (ratio >= 0.0) {
+ val ratio1 = ratio.coerceIn(0.0, 1.0)
+ AudioMixer.convolveBusCave.volume = ratio1
+ AudioMixer.convolveBusOpen.volume = 1.0 - ratio1
+ }
+ else {
+ val ratio1 = (ratio / MaterialCodex["AIIR"].sondrefl).absoluteValue.coerceIn(0.0, 1.0)
+ AudioMixer.convolveBusOpen.volume = (1.0 - ratio1).pow(0.75)
+ AudioMixer.convolveBusCave.volume = 0.0
+ }
diff --git a/src/net/torvald/terrarum/worlddrawer/FeaturesDrawer.kt b/src/net/torvald/terrarum/worlddrawer/FeaturesDrawer.kt
index d72b2bc34..796380d81 100644
--- a/src/net/torvald/terrarum/worlddrawer/FeaturesDrawer.kt
+++ b/src/net/torvald/terrarum/worlddrawer/FeaturesDrawer.kt
@@ -32,12 +32,12 @@ object FeaturesDrawer {
init {
TileSurvey.submitProposal(
TileSurvey.SurveyProposal(
- "basegame.FeaturesDrawer.coldTiles", 72, 48, 2, 2
+ "basegame.FeaturesDrawer.coldTiles", 73, 49, 2, 2
) { world, x, y -> BlockCodex[world.getTileFromTerrain(x, y)].hasTag("COLD").toInt().toFloat() }
)
TileSurvey.submitProposal(
TileSurvey.SurveyProposal(
- "basegame.FeaturesDrawer.warmTiles", 72, 48, 2, 2
+ "basegame.FeaturesDrawer.warmTiles", 73, 49, 2, 2
) { world, x, y -> BlockCodex[world.getTileFromTerrain(x, y)].hasTag("WARM").toInt().toFloat() }
)
}