issue #26 resolved (someone is hoolding stale ingame context)

This commit is contained in:
minjaesong
2019-07-03 03:59:37 +09:00
parent 42dbaaa242
commit ae8d7a67f2
27 changed files with 116 additions and 81 deletions

View File

@@ -13,7 +13,7 @@ class ActorValue(@Transient val actor: Actor) : KVHashMap() {
override fun set(key: String, value: Any) {
/*if (key == AVKey.__PLAYER_QUICKSLOTSEL) {
Thread.currentThread().stackTrace.forEach { println(it) }
printStackTrace(this)
}*/
super.set(key, value)

View File

@@ -345,7 +345,7 @@ open class ActorWBMovable(renderOrder: RenderOrder, val immobileBody: Boolean =
val feetPosTile: Point2i = Point2i(0,0)
//get() = Point2i(hIntTilewiseHitbox.centeredX.floorInt(), hIntTilewiseHitbox.endY.floorInt())
override fun run() = update(AppLoader.UPDATE_RATE.toFloat())
override fun run() = update(AppLoader.UPDATE_RATE)
/**
* Add vector value to the velocity, in the time unit of single frame.

View File

@@ -1,6 +1,7 @@
package net.torvald.terrarum.gameactors
import net.torvald.terrarum.Point2d
import net.torvald.terrarum.printStackTrace
import org.dyn4j.geometry.Vector2
/**
@@ -28,7 +29,7 @@ class Hitbox (x1: Double, y1: Double, width: Double, height: Double, var suppres
if (!suppressWarning && (width == 0.0 || height == 0.0)) {
println("[Hitbox] width or height is zero ($this), perhaps you want to check it out?")
Thread.currentThread().stackTrace.forEach { println(it) }
printStackTrace(this)
}
}
@@ -67,7 +68,7 @@ class Hitbox (x1: Double, y1: Double, width: Double, height: Double, var suppres
if (!suppressWarning && (width == 0.0 || height == 0.0)) {
println("[Hitbox] width or height is zero ($this), perhaps you want to check it out?")
Thread.currentThread().stackTrace.forEach { println(it) }
printStackTrace(this)
}
return this
@@ -85,7 +86,7 @@ class Hitbox (x1: Double, y1: Double, width: Double, height: Double, var suppres
if (!suppressWarning && (width == 0.0 || height == 0.0)) {
println("[Hitbox] width or height is zero ($this), perhaps you want to check it out?")
Thread.currentThread().stackTrace.forEach { println(it) }
printStackTrace(this)
}
return this