mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-14 20:44:05 +09:00
player is now nullable; wtf is calling Ingame 5 times?
This commit is contained in:
@@ -10,9 +10,13 @@ import net.torvald.terrarum.modulebasegame.Ingame
|
||||
*/
|
||||
internal object ToggleNoClip : ConsoleCommand {
|
||||
override fun execute(args: Array<String>) {
|
||||
val status = (Terrarum.ingame!! as Ingame).playableActor.isNoClip
|
||||
val player = (Terrarum.ingame!! as Ingame).actorNowPlaying
|
||||
if (player == null) return
|
||||
|
||||
(Terrarum.ingame!! as Ingame).playableActor.isNoClip = !status
|
||||
|
||||
val status = player.isNoClip
|
||||
|
||||
player.isNoClip = !status
|
||||
Echo("Set no-clip status to " + (!status).toString())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user