feat: added safe get entity by id

This commit is contained in:
2023-07-09 07:40:06 +03:00
parent 1406b17d62
commit 0479a21980
5 changed files with 72 additions and 46 deletions
@@ -54,8 +54,8 @@ public sealed class EntityCreateOperation : IRagonOperation
if (reader.Capacity > 0)
entity.Payload.Read(reader);
var roomPlugin = room.Plugin;
if (!roomPlugin.OnEntityCreate(player, entity))
var plugin = room.Plugin;
if (!plugin.OnEntityCreate(player, entity))
return;
entity.Attach(player);