From 10634c4621a0c0fb7bc6fbf6c1c581afe703cf8c Mon Sep 17 00:00:00 2001 From: MarioE Date: Tue, 24 Jun 2014 00:28:01 -0400 Subject: [PATCH] Fix eclipses not being sent, enable certain SSC functions if Main.ServerSideCharacter instead --- TShockAPI/Commands.cs | 2 +- TShockAPI/GetDataHandlers.cs | 2 +- TShockAPI/TSPlayer.cs | 1 + TShockAPI/TShock.cs | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/TShockAPI/Commands.cs b/TShockAPI/Commands.cs index 84afd344..46be8f9e 100755 --- a/TShockAPI/Commands.cs +++ b/TShockAPI/Commands.cs @@ -4171,7 +4171,7 @@ namespace TShockAPI { var ply = players[0]; - if (ply.IsLoggedIn && TShock.Config.ServerSideCharacter) + if (ply.IsLoggedIn && Main.ServerSideCharacter) { ply.TPlayer.velocity.Y = -50; TSPlayer.All.SendData(PacketTypes.PlayerUpdate, "", ply.Index); diff --git a/TShockAPI/GetDataHandlers.cs b/TShockAPI/GetDataHandlers.cs index c4cc335b..4258d00f 100755 --- a/TShockAPI/GetDataHandlers.cs +++ b/TShockAPI/GetDataHandlers.cs @@ -2352,7 +2352,7 @@ namespace TShockAPI } - if (args.Player.Confused && TShock.Config.ServerSideCharacter && args.Player.IsLoggedIn) + if (args.Player.Confused && Main.ServerSideCharacter && args.Player.IsLoggedIn) { if (args.TPlayer.controlUp) { diff --git a/TShockAPI/TSPlayer.cs b/TShockAPI/TSPlayer.cs index 89e70b15..ad899a6c 100755 --- a/TShockAPI/TSPlayer.cs +++ b/TShockAPI/TSPlayer.cs @@ -534,6 +534,7 @@ namespace TShockAPI DayTime = Main.dayTime, MoonPhase = (byte)Main.moonPhase, BloodMoon = Main.bloodMoon, + Eclipse = Main.eclipse, MaxTilesX = (short)Main.maxTilesX, MaxTilesY = (short)Main.maxTilesY, SpawnX = (short)Main.spawnTileX, diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs index 841c4372..77db0146 100755 --- a/TShockAPI/TShock.cs +++ b/TShockAPI/TShock.cs @@ -1367,6 +1367,7 @@ namespace TShockAPI DayTime = Main.dayTime, MoonPhase = (byte)Main.moonPhase, BloodMoon = Main.bloodMoon, + Eclipse = Main.eclipse, MaxTilesX = (short)Main.maxTilesX, MaxTilesY = (short)Main.maxTilesY, SpawnX = (short)Main.spawnTileX,