This commit is contained in:
2022-05-08 10:11:50 +04:00
parent 02a04df21f
commit e2ccdf9e01
3 changed files with 15 additions and 8 deletions
+7 -6
View File
@@ -11,8 +11,9 @@ namespace Game.Source
{
_logger.Info("Plugin started");
Subscribe<TestEvent>(123, OnTestEvent);
Subscribe(500, OnTestEvent2);;
/*Subscribe<TestEvent>(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<TestEvent>(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");
}
}
}
+5 -1
View File
@@ -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;
+3 -1
View File
@@ -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