mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-15 04:54:05 +09:00
fix wrong assert usage; addOneArgFun for Lua globals works
This commit is contained in:
@@ -27,7 +27,7 @@ class Hitbox (x1: Double, y1: Double, width: Double, height: Double, var suppres
|
||||
this.width = width
|
||||
this.height = height
|
||||
|
||||
assert(!suppressWarning && (width == 0.0 || height == 0.0)) {
|
||||
if (!suppressWarning && (width == 0.0 || height == 0.0)) {
|
||||
println("[Hitbox] width or height is zero ($this), perhaps you want to check it out?")
|
||||
printStackTrace(this)
|
||||
}
|
||||
@@ -66,7 +66,7 @@ class Hitbox (x1: Double, y1: Double, width: Double, height: Double, var suppres
|
||||
this.width = width
|
||||
this.height = height
|
||||
|
||||
assert(!suppressWarning && (width == 0.0 || height == 0.0)) {
|
||||
if (!suppressWarning && (width == 0.0 || height == 0.0)) {
|
||||
println("[Hitbox] width or height is zero ($this), perhaps you want to check it out?")
|
||||
printStackTrace(this)
|
||||
}
|
||||
@@ -84,7 +84,7 @@ class Hitbox (x1: Double, y1: Double, width: Double, height: Double, var suppres
|
||||
fun setPosition(x1: Double, y1: Double): Hitbox {
|
||||
hitboxStart = Point2d(x1, y1)
|
||||
|
||||
assert(!suppressWarning && (width == 0.0 || height == 0.0)) {
|
||||
if (!suppressWarning && (width == 0.0 || height == 0.0)) {
|
||||
println("[Hitbox] width or height is zero ($this), perhaps you want to check it out?")
|
||||
printStackTrace(this)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user