Skip to content

Commit

Permalink
Merge branch 'master' into fix-player-colors
Browse files Browse the repository at this point in the history
  • Loading branch information
kellyelton committed Mar 3, 2018
2 parents 3434502 + d629baa commit f13806d
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,6 @@
#3.2.75.0
+ fixed bug where players were never assigned to the inverted side of the two-sided table by default

#3.2.74.0

#3.2.73.0
Expand Down Expand Up @@ -3731,5 +3734,6 @@ To come...There are 30 ish more changes that can be found in our commit list htt






6 changes: 3 additions & 3 deletions Version.cs
Expand Up @@ -4,6 +4,6 @@

using System.Reflection;

[assembly: AssemblyVersion("3.2.74.0")]
[assembly: AssemblyFileVersion("3.2.74.0")]
[assembly: AssemblyInformationalVersion("3.2.74.0")]
[assembly: AssemblyVersion("3.2.75.0")]
[assembly: AssemblyFileVersion("3.2.75.0")]
[assembly: AssemblyInformationalVersion("3.2.75.0")]
6 changes: 3 additions & 3 deletions octgnFX/Octgn.Online/Octgn.Online.csproj
Expand Up @@ -2,9 +2,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Version>3.2.74.0</Version>
<AssemblyVersion>3.2.74.0</AssemblyVersion>
<FileVersion>3.2.74.0</FileVersion>
<Version>3.2.75.0</Version>
<AssemblyVersion>3.2.75.0</AssemblyVersion>
<FileVersion>3.2.75.0</FileVersion>
<Authors>Kelly Elton</Authors>
<Company>Octgn</Company>
<Description>Shared library for online access in OCTGN.</Description>
Expand Down
5 changes: 3 additions & 2 deletions octgnFX/Octgn.Server/Handler.cs
Expand Up @@ -209,14 +209,15 @@ public sealed class Handler
var aPlayers = (short)_context.Players.Players.Count(x => !x.Settings.InvertedTable);
var bPlayers = (short)_context.Players.Players.Count(x => x.Settings.InvertedTable);

var invertedTable = aPlayers > bPlayers && !playerIsSpectator;
var invertedTable = (aPlayers > bPlayers) && !playerIsSpectator;

_player.Setup(_context.NextPlayerId, nick, userId, pkey, software, playerIsSpectator, _context.Players);
_player.Setup(_context.NextPlayerId, nick, userId, pkey, software, invertedTable, playerIsSpectator, _context.Players);

_player.SaidHello = true;

// Welcome newcomer and asign them their side
_player.Rpc.Welcome(_player.Id, _context.Game.Id, GameStarted);
_player.Rpc.PlayerSettings(_player.Id, _player.Settings.InvertedTable, _player.Settings.IsSpectator);

// Notify everybody of the newcomer
_context.Broadcaster.NewPlayer(_player.Id, nick, userId, pkey, _player.Settings.InvertedTable, _player.Settings.IsSpectator);
Expand Down
4 changes: 2 additions & 2 deletions octgnFX/Octgn.Server/Player.cs
Expand Up @@ -79,13 +79,13 @@ public bool IsTimedOut
ResetSocket(socket);
}

internal void Setup(byte id, string nick, string userId, ulong pkey, string software, bool spectator, PlayerCollection collection) {
internal void Setup(byte id, string nick, string userId, ulong pkey, string software, bool invertedTable, bool spectator, PlayerCollection collection) {
Id = id;
Nick = nick;
UserId = userId;
Software = software;
Pkey = pkey;
Settings = new PlayerSettings(Settings.InvertedTable, spectator);
Settings = new PlayerSettings(invertedTable, spectator);
_collection = collection ?? throw new ArgumentNullException(nameof(collection));
}

Expand Down

0 comments on commit f13806d

Please sign in to comment.