Merge branch 'master' of git.assembla.com:terraria

This commit is contained in:
high 2011-06-03 02:36:20 -04:00
commit 0836685afc
5 changed files with 25 additions and 5 deletions

View file

@ -180,8 +180,16 @@ namespace TShockAPI
public static void Invade(CommandArgs args)
{
int ply = args.PlayerID;
Tools.Broadcast(Main.player[ply].name + " started an invasion.");
TShock.StartInvasion();
if (Main.invasionSize <= 0)
{
Tools.Broadcast(Main.player[ply].name + " has started an invasion.");
TShock.StartInvasion();
}
else
{
Tools.Broadcast(Main.player[ply].name + " has ended an invasion.");
Main.invasionSize = 0;
}
}
public static void Password(CommandArgs args)
@ -202,7 +210,7 @@ namespace TShockAPI
public static void Spawn(CommandArgs args)
{
int ply = args.PlayerID;
TShock.Teleport(ply, Main.player[ply].SpawnX * 16, Main.player[ply].SpawnY * 16);
TShock.Teleport(ply, Main.spawnTileX * 16 + 8 - Main.player[ply].width / 2, Main.spawnTileY * 16 - Main.player[ply].height);
Tools.SendMessage(ply, "Teleported to your spawnpoint.");
}

View file

@ -219,6 +219,19 @@ namespace TShockAPI
Tools.HandleCheater(ply);
}
}
else if (e.MsgID == 0x19)
{
byte ply;
using (var br = new BinaryReader(new MemoryStream(e.Msg.readBuffer, e.Index, e.Length)))
{
ply = br.ReadByte();
}
if (e.Msg.whoAmI != ply)
{
//fuck you faggot
Tools.HandleCheater(ply);
}
}
}
void OnGreetPlayer(int who, HandledEventArgs e)

View file

@ -69,8 +69,7 @@
</PreBuildEvent>
</PropertyGroup>
<PropertyGroup>
<PostBuildEvent>
</PostBuildEvent>
<PostBuildEvent>$(SolutionDir)\myass.bat</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.

Binary file not shown.

Binary file not shown.