Ejemplo n.º 1
0
        internal static void StopShootingRequest(long entityId, float attackDelay)
        {
            Debug.Assert(Sync.IsServer);

            var msg = new StopShootingMsg();

            msg.EntityId    = entityId;
            msg.AttackDelay = attackDelay;

            Sync.Layer.SendMessageToAll(ref msg);
        }
Ejemplo n.º 2
0
        private static void OnStopShootingChanged(ref StopShootingMsg message, MyNetworkClient sender)
        {
            Debug.Assert(!Sync.IsServer);

            MyEntity entity = null;

            MyEntities.TryGetEntityById(message.EntityId, out entity);
            MyHandToolBase handTool = entity as MyHandToolBase;

            if (handTool != null)
            {
                handTool.StopShooting(message.AttackDelay);
            }
        }