Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 06ff76fe0b | |||
| c92b5a5bc4 |
@@ -99,12 +99,12 @@ namespace Ragon.Core
|
||||
|
||||
public void OnConnected(ushort peerId)
|
||||
{
|
||||
_logger.Trace("Connected " + peerId);
|
||||
// _logger.Trace("Connected " + peerId);
|
||||
}
|
||||
|
||||
public void OnDisconnected(ushort peerId)
|
||||
{
|
||||
_logger.Trace("Disconnected " + peerId);
|
||||
// _logger.Trace("Disconnected " + peerId);
|
||||
|
||||
var player = _lobby.AuthorizationManager.GetPlayer(peerId);
|
||||
if (player != null)
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace Ragon.Core
|
||||
public int MaxRooms;
|
||||
|
||||
private static readonly Logger _logger = LogManager.GetCurrentClassLogger();
|
||||
private static readonly string _serverVersion = "1.0.25-rc";
|
||||
private static readonly string _serverVersion = "1.0.26-rc";
|
||||
|
||||
private static void CopyrightInfo()
|
||||
{
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using NLog;
|
||||
using Ragon.Common;
|
||||
@@ -129,7 +128,6 @@ namespace Ragon.Core
|
||||
var propertySize = reader.ReadUShort();
|
||||
entity.AddProperty(new EntityProperty(propertySize, propertyType));
|
||||
}
|
||||
|
||||
player.AttachEntity(entity);
|
||||
AttachEntity(player, entity);
|
||||
}
|
||||
@@ -219,8 +217,6 @@ namespace Ragon.Core
|
||||
var eventAuthority = (RagonAuthority) reader.ReadByte();
|
||||
var propertiesCount = reader.ReadUShort();
|
||||
|
||||
_logger.Trace($"[{peerId}] Create Entity {entityType}");
|
||||
|
||||
var player = _players[peerId];
|
||||
var entity = new Entity(this, player.PeerId, entityType, 0, eventAuthority);
|
||||
for (var i = 0; i < propertiesCount; i++)
|
||||
@@ -306,12 +302,17 @@ namespace Ragon.Core
|
||||
_writer.WriteOperation(RagonOperation.OWNERSHIP_CHANGED);
|
||||
_writer.WriteString(next.Id);
|
||||
_writer.WriteUShort((ushort) entitiesToUpdate.Length);
|
||||
|
||||
foreach (var entity in entitiesToUpdate)
|
||||
{
|
||||
_writer.WriteUShort(entity.EntityId);
|
||||
entity.SetOwner((ushort) next.PeerId);
|
||||
entity.SetOwner(next.PeerId);
|
||||
|
||||
next.Entities.Add(entity);
|
||||
}
|
||||
|
||||
next.EntitiesIds = next.Entities.Select(e => e.EntityId).ToList();
|
||||
|
||||
BroadcastToReady(_writer, DeliveryType.Reliable);
|
||||
}
|
||||
|
||||
@@ -345,6 +346,7 @@ namespace Ragon.Core
|
||||
|
||||
void BroadcastSnapshot(ushort[] peersIds)
|
||||
{
|
||||
_logger.Trace("Snapshot");
|
||||
_writer.Clear();
|
||||
_writer.WriteOperation(RagonOperation.SNAPSHOT);
|
||||
_writer.WriteUShort((ushort) _readyPlayers.Length);
|
||||
|
||||
@@ -74,7 +74,7 @@ public class RoomManager
|
||||
{
|
||||
if (existRoom.Map == map && existRoom.PlayersCount < existRoom.PlayersMax)
|
||||
{
|
||||
_logger.Trace($"Player ({player.PlayerName}|{player.Id}) joined to room with Id {roomId}");
|
||||
_logger.Trace($"Player ({player.PlayerName}|{player.Id}) joined to room with Id {existRoom.Id}");
|
||||
|
||||
existRoom.AddPlayer(player, payload);
|
||||
_roomsBySocket.Add(player.PeerId, existRoom);
|
||||
|
||||
@@ -16,8 +16,8 @@ Ragon is fully free, small and high perfomance room based game server with plugi
|
||||
- Simple matchmaking
|
||||
- Room based architecture
|
||||
- Сustomizable authorization
|
||||
- Сustomizable server-side logic via plugins with flexible API
|
||||
- No CCU limitations*
|
||||
- Сustomizable server-side logic via plugins with flexible API*(2)
|
||||
- No CCU limitations*(1)
|
||||
- No Room count limitations
|
||||
- Reliable UDP
|
||||
|
||||
@@ -27,10 +27,11 @@ Ragon is fully free, small and high perfomance room based game server with plugi
|
||||
|
||||
### Dependencies
|
||||
* ENet-Sharp [v2.4.8]
|
||||
* NetStack [latest]
|
||||
|
||||
### License
|
||||
MIT
|
||||
|
||||
### Tips
|
||||
\* Limited to 4095 CCU by library ENet-Sharp
|
||||
\* Limited to 4095 CCU by library ENet-Sharp (1)
|
||||
|
||||
\* Non finally (2)
|
||||
|
||||
Reference in New Issue
Block a user