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