diff --git a/Game/Source/Modes/ExamplePlugin.cs b/Game/Source/Modes/ExamplePlugin.cs index d6d8981..7f42945 100755 --- a/Game/Source/Modes/ExamplePlugin.cs +++ b/Game/Source/Modes/ExamplePlugin.cs @@ -11,8 +11,9 @@ namespace Game.Source { _logger.Info("Plugin started"); - Subscribe(123, OnTestEvent); - Subscribe(500, OnTestEvent2);; + /*Subscribe(123, OnTestEvent); + */ + // Subscribe(500, OnTestEvent2);; } private void OnTestEvent2(Player obj) @@ -53,7 +54,7 @@ namespace Game.Source public override void OnEntityCreated(Player creator, Entity entity) { // entity. - Subscribe(entity, 123, OnEntityTestEvent); + // Subscribe(entity, 500, OnEntityTestEvent); } public override void OnEntityDestroyed(Player destoyer, Entity entity) @@ -61,9 +62,9 @@ namespace Game.Source } - private void OnEntityTestEvent(Player player, Entity entity, TestEvent data) - { - + private void OnEntityTestEvent(Player player, Entity entity) + { + _logger.Info("Entity event with empty payload"); } } } \ No newline at end of file diff --git a/Ragon/Sources/Rooms/Room.cs b/Ragon/Sources/Rooms/Room.cs index d7255c7..5c8dbe5 100755 --- a/Ragon/Sources/Rooms/Room.cs +++ b/Ragon/Sources/Rooms/Room.cs @@ -175,11 +175,15 @@ namespace Ragon.Core } case RagonOperation.REPLICATE_ENTITY_EVENT: { + var evntCodeData = rawData.Slice(2, 2); var entityIdData = rawData.Slice(4, 4); var evntId = RagonHeader.ReadUShort(ref evntCodeData); var entityId = RagonHeader.ReadInt(ref entityIdData); - + + if (!_entities.ContainsKey(entityId)) + return; + if (_entities[entityId].OwnerId != peerId) return; diff --git a/readme.md b/readme.md index 70411b1..235246a 100755 --- a/readme.md +++ b/readme.md @@ -14,6 +14,7 @@ Ragon is fully free high perfomance room based game server with plugin based arc ### Features: - Free +- Simple matchmaking - Flexiable API - Support client authoritative - Support server authoritative @@ -28,7 +29,8 @@ Ragon is fully free high perfomance room based game server with plugin based arc - UDP ### Roadmap: -- Use native memory +- Allow customize matchmaking +- Use native memory - Reduce allocations - Dashboard for monitoring entities and players in realtime - Statistics for monitoring state of server, cpu, memory