player is now nullable; wtf is calling Ingame 5 times?

This commit is contained in:
minjaesong
2018-09-17 01:46:50 +09:00
parent ef8285dd97
commit 6a1146f67b
35 changed files with 252 additions and 150 deletions

View File

@@ -28,7 +28,8 @@ object BlockStats {
// Get stats on no-zoomed screen area. In other words, will behave as if screen zoom were 1.0
// no matter how the screen is zoomed.
val map = (Terrarum.ingame!!.world)
val player = (Terrarum.ingame!! as Ingame).playableActor
val player = (Terrarum.ingame!! as Ingame).actorNowPlaying
if (player == null) return
val renderWidth = FastMath.ceil(Terrarum.WIDTH.toFloat())
val renderHeight = FastMath.ceil(Terrarum.HEIGHT.toFloat())