wip
This commit is contained in:
@@ -11,8 +11,9 @@ namespace Game.Source
|
|||||||
{
|
{
|
||||||
_logger.Info("Plugin started");
|
_logger.Info("Plugin started");
|
||||||
|
|
||||||
Subscribe<TestEvent>(123, OnTestEvent);
|
/*Subscribe<TestEvent>(123, OnTestEvent);
|
||||||
Subscribe(500, OnTestEvent2);;
|
*/
|
||||||
|
// Subscribe(500, OnTestEvent2);;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnTestEvent2(Player obj)
|
private void OnTestEvent2(Player obj)
|
||||||
@@ -53,7 +54,7 @@ namespace Game.Source
|
|||||||
public override void OnEntityCreated(Player creator, Entity entity)
|
public override void OnEntityCreated(Player creator, Entity entity)
|
||||||
{
|
{
|
||||||
// entity.
|
// entity.
|
||||||
Subscribe<TestEvent>(entity, 123, OnEntityTestEvent);
|
// Subscribe(entity, 500, OnEntityTestEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnEntityDestroyed(Player destoyer, Entity entity)
|
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");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -175,11 +175,15 @@ namespace Ragon.Core
|
|||||||
}
|
}
|
||||||
case RagonOperation.REPLICATE_ENTITY_EVENT:
|
case RagonOperation.REPLICATE_ENTITY_EVENT:
|
||||||
{
|
{
|
||||||
|
|
||||||
var evntCodeData = rawData.Slice(2, 2);
|
var evntCodeData = rawData.Slice(2, 2);
|
||||||
var entityIdData = rawData.Slice(4, 4);
|
var entityIdData = rawData.Slice(4, 4);
|
||||||
var evntId = RagonHeader.ReadUShort(ref evntCodeData);
|
var evntId = RagonHeader.ReadUShort(ref evntCodeData);
|
||||||
var entityId = RagonHeader.ReadInt(ref entityIdData);
|
var entityId = RagonHeader.ReadInt(ref entityIdData);
|
||||||
|
|
||||||
|
if (!_entities.ContainsKey(entityId))
|
||||||
|
return;
|
||||||
|
|
||||||
if (_entities[entityId].OwnerId != peerId)
|
if (_entities[entityId].OwnerId != peerId)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ Ragon is fully free high perfomance room based game server with plugin based arc
|
|||||||
|
|
||||||
### Features:
|
### Features:
|
||||||
- Free
|
- Free
|
||||||
|
- Simple matchmaking
|
||||||
- Flexiable API
|
- Flexiable API
|
||||||
- Support client authoritative
|
- Support client authoritative
|
||||||
- Support server authoritative
|
- Support server authoritative
|
||||||
@@ -28,6 +29,7 @@ Ragon is fully free high perfomance room based game server with plugin based arc
|
|||||||
- UDP
|
- UDP
|
||||||
|
|
||||||
### Roadmap:
|
### Roadmap:
|
||||||
|
- Allow customize matchmaking
|
||||||
- Use native memory
|
- Use native memory
|
||||||
- Reduce allocations
|
- Reduce allocations
|
||||||
- Dashboard for monitoring entities and players in realtime
|
- Dashboard for monitoring entities and players in realtime
|
||||||
|
|||||||
Reference in New Issue
Block a user