Add tp command
This commit is contained in:
parent
5feda5b8c2
commit
ae45a57781
@ -1,5 +1,6 @@
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.InputSystem;
|
using UnityEngine.InputSystem;
|
||||||
|
using NeonTea.Quakeball.Interface;
|
||||||
using NeonTea.Quakeball.Networking;
|
using NeonTea.Quakeball.Networking;
|
||||||
using NeonTea.Quakeball.Networking.Packets;
|
using NeonTea.Quakeball.Networking.Packets;
|
||||||
|
|
||||||
@ -44,6 +45,14 @@ namespace NeonTea.Quakeball.Players {
|
|||||||
.With("Down", "<Keyboard>/s")
|
.With("Down", "<Keyboard>/s")
|
||||||
.With("Left", "<Keyboard>/a")
|
.With("Left", "<Keyboard>/a")
|
||||||
.With("Right", "<Keyboard>/d");
|
.With("Right", "<Keyboard>/d");
|
||||||
|
|
||||||
|
Terminal.Singleton.RegisterCommand("tp", args => {
|
||||||
|
if (args.Length != 3) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
transform.position = new Vector3(float.Parse(args[0]), float.Parse(args[1]), float.Parse(args[2]));
|
||||||
|
return true;
|
||||||
|
}, "tp x y z - Teleports the local player to the specified coordinates.");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Update() {
|
private void Update() {
|
||||||
|
Loading…
Reference in New Issue
Block a user