Skip to content

Commit a104ea7

Browse files
Remove debug code
1 parent b3e97b4 commit a104ea7

File tree

5 files changed

+9
-22
lines changed

5 files changed

+9
-22
lines changed

ShimmysAdminTools/Commands/MuteCommand.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ public void Execute(IRocketPlayer caller, string[] command)
3939
if (command.Length > 1)
4040
{
4141
TimeSpan MuteTS = Helpers.GetTimespanFromString(command[1]);
42-
Console.WriteLine($"Mute Dur: {MuteTS.TotalSeconds}");
4342
UnturnedChat.Say(caller, "Mute_PlayerMuted_Time".Translate(Helpers.GetTimeFromTimespan(MuteTS)));
4443
playerData.MuteExpires = DateTime.Now.Add(MuteTS);
4544
playerData.MuteIsTemp = true;

ShimmysAdminTools/Components/Helpers.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ public static TimeSpan GetTimespanFromString(string dur)
107107
{
108108
double numst = GetNumericStart(dur);
109109
string tmod = GetTimeModifier(dur);
110-
Console.WriteLine($"t: {numst}, m: {tmod}");
111110
return GetTimespanFromDetails(numst, tmod);
112111
}
113112
public static string GetTimeFromTimespan(TimeSpan ts)

ShimmysAdminTools/Models/MapJumpingSession.cs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,18 +48,12 @@ private void FixedUpdate()
4848
if (Player.Player.quests.markerPosition != LastPos)
4949
{
5050
LastPos = Player.Player.quests.markerPosition;
51-
System.Console.WriteLine("try marker tp");
5251
RaycastResult Raycast = RaycastUtility.Raycast(new Vector3(LastPos.x, 1024, LastPos.z), Vector3.down, RayMasks.GROUND | RayMasks.GROUND2 | RayMasks.STRUCTURE | RayMasks.ENVIRONMENT | RayMasks.LARGE
5352
| RayMasks.MEDIUM | RayMasks.SMALL | RayMasks.RESOURCE | RayMasks.BARRICADE, 1024);
5453
if (Raycast.RaycastHit)
5554
{
56-
System.Console.WriteLine($"try tp");
5755
Player.Teleport(new Vector3(Raycast.Raycast.point.x, Raycast.Raycast.point.y + 1, Raycast.Raycast.point.z), Player.Rotation);
58-
System.Console.WriteLine("tped");
59-
} else
60-
{
61-
System.Console.WriteLine($"did not hit!");
62-
}
56+
}
6357
}
6458
}
6559
}

ShimmysAdminTools/Models/PlayerSession.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,11 @@ public void StartMapJumpingSession()
2525
{
2626
if (MapJumpingSession == null)
2727
{
28-
Console.WriteLine("Create Jump Session");
2928
MapJumpingSession = new GameObject("MapJumpingSession");
3029
UnityEngine.Object.DontDestroyOnLoad(MapJumpingSession);
3130
MapJumpingSession.AddComponent<MapJumpingSession>();
3231
UnturnedPlayer pl = UnturnedPlayer.FromCSteamID(new Steamworks.CSteamID(Player));
33-
Console.WriteLine($"create {pl.DisplayName}");
3432
GameObjectExtension.getOrAddComponent<MapJumpingSession>(MapJumpingSession).SetPlayer(pl);
35-
//MapJumpingSession = new GameObject("MapJumpingSession");
36-
//UnityEngine.Object.DontDestroyOnLoad(MapJumpingSession);
37-
//MapJumpingSession.AddComponent<MapJumpingSession>().SetPlayer(UnturnedPlayer.FromCSteamID(new Steamworks.CSteamID(Player)));
3833
}
3934
}
4035

ShimmysAdminTools/Modules/PointToolManager.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -196,25 +196,25 @@ public static void RunJumpTool(UnturnedPlayer Player, RaycastResult Raycast, Unt
196196

197197
if (RunMode == 0)
198198
{
199-
Player.Teleport(new Vector3(Raycast.Raycast.point.x, Raycast.Raycast.point.y + 0.5f, Raycast.Raycast.point.z), Player.Rotation);
199+
Player.Player.teleportToLocationUnsafe(Raycast.Raycast.point, Player.Rotation);
200200
}
201201
else if (RunMode == 1)
202202
{
203203
if (Raycast.Raycast.distance < 300)
204204
{
205205
Vector3 Target = new Vector3(Raycast.Raycast.point.x, Raycast.Raycast.point.y + (float)1.75, Raycast.Raycast.point.z);
206-
Player.Teleport(Target, Player.Rotation);
206+
Player.Player.teleportToLocationUnsafe(Target, Player.Rotation);
207207
}
208208
else
209209
{
210-
Player.Teleport(new Vector3(Raycast.Raycast.point.x, Raycast.Raycast.point.y + 0.5f, Raycast.Raycast.point.z), Player.Rotation);
210+
Player.Player.teleportToLocationUnsafe(Raycast.Raycast.point, Player.Rotation);
211211
}
212212
}
213213
else if (RunMode == 2)
214214
{
215215
if (Raycast.Raycast.distance > 300)
216216
{
217-
Player.Teleport(new Vector3(Raycast.Raycast.point.x, Raycast.Raycast.point.y + 0.5f, Raycast.Raycast.point.z), Player.Rotation);
217+
Player.Player.teleportToLocationUnsafe(Raycast.Raycast.point, Player.Rotation);
218218
}
219219
else
220220
{
@@ -242,7 +242,7 @@ public static void RunJumpTool(UnturnedPlayer Player, RaycastResult Raycast, Unt
242242

243243
if (DownCast.RaycastHit && DownCast.Raycast.distance != 0 && DownCast.Raycast.distance < DistanceToGround)
244244
{
245-
Player.Teleport(new Vector3(DownCast.Raycast.point.x, DownCast.Raycast.point.y + 0.5f, DownCast.Raycast.point.z), Player.Rotation);
245+
Player.Player.teleportToLocationUnsafe(new Vector3(DownCast.Raycast.point.x, DownCast.Raycast.point.y + 0.2f, DownCast.Raycast.point.z), Player.Rotation);
246246
}
247247
else
248248
{
@@ -266,19 +266,19 @@ public static void RunJumpTool(UnturnedPlayer Player, RaycastResult Raycast, Unt
266266

267267
if (Placing.Count() != 0)
268268
{
269-
Player.Teleport(new Vector3(Placing[0].x, Placing[0].y + 0.5f, Placing[0].z), Player.Rotation);
269+
Player.Player.teleportToLocationUnsafe(new Vector3(Placing[0].x, Placing[0].y + 0.5f, Placing[0].z), Player.Rotation);
270270
}
271271
else
272272
{
273-
Player.Teleport(new Vector3(TargetPos.x, TargetPos.y + 0.5f, TargetPos.z), Player.Rotation);
273+
Player.Player.teleportToLocationUnsafe(new Vector3(TargetPos.x, TargetPos.y + 0.5f, TargetPos.z), Player.Rotation);
274274
}
275275
}
276276
else if (gesture == UnturnedPlayerEvents.PlayerGesture.Point)
277277
{
278278
Vector3 TargetPos = Raycast.Raycast.point;
279279
Vector3 CurrentPos = Player.Position;
280280
Vector3 ResultPos = Vector3.MoveTowards(TargetPos, CurrentPos, 1);
281-
Player.Teleport(new Vector3(ResultPos.x, ResultPos.y + 0.5f, ResultPos.z), Player.Rotation);
281+
Player.Player.teleportToLocationUnsafe(new Vector3(ResultPos.x, ResultPos.y + 0.5f, ResultPos.z), Player.Rotation);
282282
}
283283
}
284284

0 commit comments

Comments
 (0)