mirror of
https://github.com/MrOkiDoki/BattleBit-Community-Server-API.git
synced 2025-01-24 10:07:48 -03:00
Merge pull request #78 from MrOkiDoki/develop
Teleport, Kickreason fixed.
This commit is contained in:
commit
99037797a7
5 changed files with 19 additions and 7 deletions
|
@ -2,7 +2,7 @@
|
|||
{
|
||||
public static class Const
|
||||
{
|
||||
public static string Version = "1.0.4v";
|
||||
public static string Version = "1.0.5v";
|
||||
|
||||
// ---- Networking ----
|
||||
/// <summary>
|
||||
|
|
|
@ -675,6 +675,14 @@ namespace BattleBitAPI.Server
|
|||
{
|
||||
PromoteSquadLeader(player.SteamID);
|
||||
}
|
||||
public void Teleport(ulong steamID, Vector3 position)
|
||||
{
|
||||
ExecuteCommand("teleport " + steamID + " " + position.X+","+ position.Y+","+ position.Z);
|
||||
}
|
||||
public void Teleport(Player<TPlayer> player, Vector3 position)
|
||||
{
|
||||
Teleport(player.SteamID, position);
|
||||
}
|
||||
public void WarnPlayer(ulong steamID, string msg)
|
||||
{
|
||||
ExecuteCommand("warn " + steamID + " " + msg);
|
||||
|
|
|
@ -249,7 +249,7 @@ namespace BattleBitAPI
|
|||
}
|
||||
public void Teleport(Vector3 target)
|
||||
{
|
||||
|
||||
GameServer.Teleport(this, target);
|
||||
}
|
||||
public void SpawnPlayer(PlayerLoadout loadout, PlayerWearings wearings, Vector3 position, Vector3 lookDirection, PlayerStand stand, float spawnProtection)
|
||||
{
|
||||
|
|
|
@ -1444,12 +1444,16 @@ namespace BattleBitAPI.Server
|
|||
}
|
||||
case NetworkCommuncation.GameTick:
|
||||
{
|
||||
if (stream.CanRead(4 + 4 + 4))
|
||||
if (stream.CanRead(12 + 12 + 1))
|
||||
{
|
||||
float decompressX = stream.ReadFloat();
|
||||
float decompressY = stream.ReadFloat();
|
||||
float decompressZ = stream.ReadFloat();
|
||||
|
||||
float offsetX = stream.ReadFloat();
|
||||
float offsetY = stream.ReadFloat();
|
||||
float offsetZ = stream.ReadFloat();
|
||||
|
||||
int playerCount = stream.ReadInt8();
|
||||
while (playerCount > 0)
|
||||
{
|
||||
|
@ -1491,9 +1495,9 @@ namespace BattleBitAPI.Server
|
|||
|
||||
@internal.Position = new Vector3()
|
||||
{
|
||||
X = com_posX * decompressX,
|
||||
Y = com_posY * decompressY,
|
||||
Z = com_posZ * decompressZ,
|
||||
X = (com_posX * decompressX) - offsetX,
|
||||
Y = (com_posY * decompressY) - offsetY,
|
||||
Z = (com_posZ * decompressZ) - offsetZ,
|
||||
};
|
||||
@internal.HP = newHP;
|
||||
@internal.Standing = standing;
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<PackageProjectUrl>https://github.com/MrOkiDoki/BattleBit-Community-Server-API</PackageProjectUrl>
|
||||
<RepositoryUrl>https://github.com/MrOkiDoki/BattleBit-Community-Server-API</RepositoryUrl>
|
||||
<PackageTags>BattleBit</PackageTags>
|
||||
<Version>1.0.4.1</Version>
|
||||
<Version>1.0.4.2</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
Loading…
Add table
Reference in a new issue