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 967eafe8a3
commit 03b642ddd3
35 changed files with 252 additions and 150 deletions

View File

@@ -39,7 +39,11 @@ abstract class Actor(val renderOrder: RenderOrder) : Comparable<Actor>, Runnable
var actorValue = ActorValue(this)
@Volatile var flagDespawn = false
override fun equals(other: Any?) = referenceID == (other as Actor).referenceID
override fun equals(other: Any?): Boolean {
if (other == null) return false
return referenceID == (other as Actor).referenceID
}
override fun hashCode() = referenceID!!
override fun toString() =
if (actorValue.getAsString("name").isNullOrEmpty())

View File

@@ -337,7 +337,7 @@ open class ActorWBMovable(val world: GameWorld, renderOrder: RenderOrder, val im
if (spriteGlow != null) spriteGlow!!.update(delta)
// make NoClip work for player
if (true) {//this == Terrarum.ingame!!.playableActor) {
if (true) {//this == Terrarum.ingame!!.actorNowPlaying) {
isNoSubjectToGrav = isNoClip || COLLISION_TEST_MODE
isNoCollideWorld = isNoClip
isNoSubjectToFluidResistance = isNoClip