mirror of
https://github.com/MrOkiDoki/BattleBit-Community-Server-API.git
synced 2025-01-24 18:23:09 -03:00
bug fixes
This commit is contained in:
parent
7af837e24d
commit
5acd7186ca
4 changed files with 33 additions and 5 deletions
|
@ -43,5 +43,7 @@
|
||||||
NotifyNewRoundID = 73,
|
NotifyNewRoundID = 73,
|
||||||
Log = 74,
|
Log = 74,
|
||||||
OnSquadLeaderChanged = 75,
|
OnSquadLeaderChanged = 75,
|
||||||
|
UpdateNewGameData = 76,
|
||||||
|
UpdateConnectedPlayers = 77,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1357,6 +1357,8 @@ namespace BattleBitAPI.Server
|
||||||
this.RoundIndex = roundIndex;
|
this.RoundIndex = roundIndex;
|
||||||
this.SessionID = sessionID;
|
this.SessionID = sessionID;
|
||||||
|
|
||||||
|
this.Players.Clear();
|
||||||
|
|
||||||
this.ServerSettings.Reset();
|
this.ServerSettings.Reset();
|
||||||
this._RoomSettings.Reset();
|
this._RoomSettings.Reset();
|
||||||
this.IsDirtyRoomSettings = false;
|
this.IsDirtyRoomSettings = false;
|
||||||
|
|
|
@ -486,10 +486,6 @@ namespace BattleBitAPI.Server
|
||||||
sessionID = readStream.ReadInt64();
|
sessionID = readStream.ReadInt64();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
server = this.mInstanceDatabase.GetServerInstance(hash, out resources, this.OnCreatingGameServerInstance, ip, (ushort)gamePort);
|
server = this.mInstanceDatabase.GetServerInstance(hash, out resources, this.OnCreatingGameServerInstance, ip, (ushort)gamePort);
|
||||||
resources.Set(
|
resources.Set(
|
||||||
this.mExecutePackage,
|
this.mExecutePackage,
|
||||||
|
@ -859,6 +855,34 @@ namespace BattleBitAPI.Server
|
||||||
var communcation = (NetworkCommuncation)stream.ReadInt8();
|
var communcation = (NetworkCommuncation)stream.ReadInt8();
|
||||||
switch (communcation)
|
switch (communcation)
|
||||||
{
|
{
|
||||||
|
case NetworkCommuncation.UpdateNewGameData:
|
||||||
|
{
|
||||||
|
if (stream.CanRead(10))
|
||||||
|
{
|
||||||
|
resources.CurrentPlayerCount = stream.ReadInt8();
|
||||||
|
resources.InQueuePlayerCount = stream.ReadInt8();
|
||||||
|
resources.MaxPlayerCount = stream.ReadInt8();
|
||||||
|
resources.MaxPlayerCount = stream.ReadInt8();
|
||||||
|
stream.TryReadString(out resources.Gamemode);
|
||||||
|
resources.MapSize = (MapSize)stream.ReadInt8();
|
||||||
|
stream.TryReadString(out resources.Map);
|
||||||
|
byte gameType = stream.ReadInt8();
|
||||||
|
resources.DayNight = (MapDayNight)stream.ReadInt8();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case NetworkCommuncation.UpdateConnectedPlayers:
|
||||||
|
{
|
||||||
|
if (stream.CanRead(4))
|
||||||
|
{
|
||||||
|
resources.CurrentPlayerCount = stream.ReadInt8();
|
||||||
|
resources.InQueuePlayerCount = stream.ReadInt8();
|
||||||
|
resources.MaxPlayerCount = stream.ReadInt8();
|
||||||
|
resources.MaxPlayerCount = stream.ReadInt8();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case NetworkCommuncation.PlayerConnected:
|
case NetworkCommuncation.PlayerConnected:
|
||||||
{
|
{
|
||||||
if (stream.CanRead(8 + 2 + 4 + (1 + 1 + 1)))
|
if (stream.CanRead(8 + 2 + 4 + (1 + 1 + 1)))
|
||||||
|
|
|
@ -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</Version>
|
<Version>1.0.4.1</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
Loading…
Add table
Reference in a new issue