static void OnBatchAddItemMessage(ref BatchAddItemMsg msg, MyNetworkClient sender) { Debug.Assert(!Sync.IsServer); MyEnvironmentItems entity; if (MyEntities.TryGetEntityById <MyEnvironmentItems>(msg.EntityId, out entity)) { entity.BatchAddItem(msg.Position, msg.SubtypeId, false); } }
public static void SendBatchAddItemMessage(long entityId, Vector3D position, MyStringHash subtypeId) { var msg = new BatchAddItemMsg() { EntityId = entityId, Position = position, SubtypeId = subtypeId }; Sync.Layer.SendMessageToAllButOne(ref msg, MySteam.UserId, MyTransportMessageEnum.Request); }
static void OnBatchAddItemMessage(ref BatchAddItemMsg msg, MyNetworkClient sender) { Debug.Assert(!Sync.IsServer); MyEnvironmentItems entity; if (MyEntities.TryGetEntityById<MyEnvironmentItems>(msg.EntityId, out entity)) { entity.BatchAddItem(msg.Position, msg.SubtypeId, msg.ModelId, false); } }
public static void SendBatchAddItemMessage(long entityId, Vector3D position, MyStringHash subtypeId, int modelId) { var msg = new BatchAddItemMsg() { EntityId = entityId, Position = position, SubtypeId = subtypeId, ModelId = modelId, }; Sync.Layer.SendMessageToAllButOne(ref msg, MySteam.UserId, MyTransportMessageEnum.Request); }