예제 #1
0
        public static void SendParticleEffectRequest(string id, MatrixD remoteMatrix, Vector3D offset, float scale, float maxTime, Vector3D color)
        {
            var effect = new Effects();

            effect.Mode               = EffectSyncMode.Particle;
            effect.Coords             = Vector3D.Transform(offset, remoteMatrix);
            effect.ParticleId         = id;
            effect.ParticleScale      = scale;
            effect.ParticleColor      = color;
            effect.ParticleMaxTime    = maxTime;
            effect.ParticleForwardDir = remoteMatrix.Forward;
            effect.ParticleUpDir      = remoteMatrix.Up;
            var syncData = new SyncContainer(effect);

            foreach (var player in TargetHelper.GetPlayersWithinDistance(effect.Coords, 15000))
            {
                SyncManager.SendSyncMesage(syncData, player.SteamUserId);
            }
        }