fix: panning dynamic source sending nan values

This commit is contained in:
minjaesong
2024-01-11 14:42:16 +09:00
parent ecd8f08419
commit df813712ff
17 changed files with 15 additions and 19 deletions

View File

@@ -339,7 +339,7 @@ class TerrarumMusicGovernor : MusicGovernor() {
fun stopMusic(callStopMusicHook: Boolean = true, pauseLen: Float = Float.POSITIVE_INFINITY) {
stopMusic(AudioMixer.musicTrack.currentTrack, callStopMusicHook)
intermissionLength = pauseLen
printdbg(this, "StopMusic Intermission2: $intermissionLength seconds")
// printdbg(this, "StopMusic Intermission2: $intermissionLength seconds")
}
fun startMusic() {

View File

@@ -138,7 +138,7 @@ open class Electric : FixtureBase {
open class FixtureBase : ActorWithBody, CuedByTerrainChange {
@Transient open val spawnNeedsWall: Boolean = false
@Transient open val spawnNeedsFloor: Boolean = false
@Transient open val spawnNeedsFloor: Boolean = true
/** Real time, in nanoseconds */
@Transient var spawnRequestedTime: Long = 0L

View File

@@ -19,7 +19,6 @@ import net.torvald.terrarumsansbitmap.gdx.TextureRegionPack
*/
class FixtureFurnaceAndAnvil : FixtureBase, CraftingStation {
@Transient override val spawnNeedsFloor = true
@Transient override val tags = listOf("metalworking")
constructor() : super(

View File

@@ -9,6 +9,8 @@ import org.dyn4j.geometry.Vector2
class FixtureLogicSignalEmitter : Electric {
@Transient override val spawnNeedsFloor = false
constructor() : super(
BlockBox(BlockBox.NO_COLLISION, 1, 1),
nameFun = { Lang["ITEM_LOGIC_SIGNAL_EMITTER"] }

View File

@@ -22,7 +22,6 @@ import net.torvald.terrarumsansbitmap.gdx.TextureRegionPack
*/
class FixtureSmelterBasic : FixtureBase, CraftingStation {
@Transient override val spawnNeedsFloor = true
@Transient override val tags = listOf("basicsmelter")
constructor() : super(

View File

@@ -13,7 +13,6 @@ import net.torvald.terrarumsansbitmap.gdx.TextureRegionPack
*/
internal class FixtureStorageChest : FixtureBase {
@Transient override val spawnNeedsFloor = true
constructor() : super(
BlockBox(BlockBox.ALLOW_MOVE_DOWN, 1, 1),

View File

@@ -44,6 +44,8 @@ open class FixtureSwingingDoorBase : FixtureBase {
private var tilewiseDistToAxis = tw - twClosed
@Transient override val spawnNeedsWall = true
@Transient override val spawnNeedsFloor = false
@Transient override var lightBoxList = arrayListOf(Lightbox(Hitbox(TILE_SIZED * tilewiseDistToAxis, 0.0, TILE_SIZED * twClosed, TILE_SIZED * th), Cvec(0)))
// the Cvec will be calculated dynamically on Update
@Transient override var shadeBoxList = arrayListOf(Lightbox(Hitbox(TILE_SIZED * tilewiseDistToAxis, 0.0, TILE_SIZED * twClosed, TILE_SIZED * th), Cvec(0)))

View File

@@ -7,7 +7,6 @@ import net.torvald.terrarum.blockproperties.Block
* Created by minjaesong on 2022-07-28.
*/
class FixtureSwingingDoorOak : FixtureSwingingDoorBase {
@Transient override val spawnNeedsWall = true
constructor() : super() {
_construct(
2,
@@ -25,7 +24,6 @@ class FixtureSwingingDoorOak : FixtureSwingingDoorBase {
}
class FixtureSwingingDoorEbony : FixtureSwingingDoorBase {
@Transient override val spawnNeedsWall = true
constructor() : super() {
_construct(
2,
@@ -43,7 +41,6 @@ class FixtureSwingingDoorEbony : FixtureSwingingDoorBase {
}
class FixtureSwingingDoorBirch : FixtureSwingingDoorBase {
@Transient override val spawnNeedsWall = true
constructor() : super() {
_construct(
2,
@@ -61,7 +58,6 @@ class FixtureSwingingDoorBirch : FixtureSwingingDoorBase {
}
class FixtureSwingingDoorRosewood : FixtureSwingingDoorBase {
@Transient override val spawnNeedsWall = true
constructor() : super() {
_construct(
2,

View File

@@ -19,6 +19,7 @@ import kotlin.properties.Delegates
internal class FixtureTapestry : FixtureBase {
@Transient override val spawnNeedsWall = true
@Transient override val spawnNeedsFloor = false
var artName = ""; private set
var artAuthor = ""; private set

View File

@@ -20,7 +20,6 @@ import net.torvald.terrarumsansbitmap.gdx.TextureRegionPack
*/
internal class FixtureTikiTorch : FixtureBase {
@Transient override val spawnNeedsFloor = true
private val rndHash1 = (Math.random() * 256).toInt()
private val rndHash2 = (Math.random() * 256).toInt()

View File

@@ -10,7 +10,6 @@ import kotlin.math.roundToInt
*/
class FixtureTypewriter : FixtureBase {
@Transient override val spawnNeedsFloor = true
var typewriterKeymapName = "us_qwerty" // used to control the keyboard input behaviour
private set

View File

@@ -14,6 +14,7 @@ import net.torvald.terrarumsansbitmap.gdx.TextureRegionPack
class FixtureWallCalendar : FixtureBase {
@Transient override val spawnNeedsWall = true
@Transient override val spawnNeedsFloor = false
constructor() : super(
BlockBox(BlockBox.NO_COLLISION, 1, 1),

View File

@@ -17,7 +17,6 @@ import net.torvald.terrarumsansbitmap.gdx.TextureRegionPack
*/
class FixtureWorkbench : FixtureBase, CraftingStation {
@Transient override val spawnNeedsFloor = true
@Transient override val tags = listOf("basiccrafting")
constructor() : super(

View File

@@ -19,8 +19,6 @@ import net.torvald.terrarumsansbitmap.gdx.TextureRegionPack
*/
class FixtureWorldPortal : Electric {
@Transient override val spawnNeedsFloor = true
constructor() : super(
BlockBox(BlockBox.NO_COLLISION, 5, 2),
nameFun = { Lang["ITEM_WORLD_PORTAL"] },