Beispiel #1
0
        public static void SendScriptedChatMessage(ref ScriptedChatMsg msg)
        {
            EndpointId targetEndpoint = new EndpointId();
            Vector3D?  position       = null;

            Sandbox.Engine.Multiplayer.MyMultiplayer.RaiseStaticEvent <ScriptedChatMsg>(s => new Action <ScriptedChatMsg>(MyMultiplayerBase.OnScriptedChatMessageRecieved), msg, targetEndpoint, position);
        }
Beispiel #2
0
 private static void OnScriptedChatMessageRecieved(ScriptedChatMsg msg)
 {
     if ((MySession.Static != null) && ((msg.Target == 0) || (MySession.Static.LocalPlayerId == msg.Target)))
     {
         Sandbox.Engine.Multiplayer.MyMultiplayer.Static.OnScriptedChatMessage(ref msg);
     }
 }
Beispiel #3
0
 static void OnScriptedChatMessageRecieved(ScriptedChatMsg msg)
 {
     if (MySession.Static == null)
     {
         return;
     }
     if (msg.Target != 0 && MySession.Static.LocalPlayerId != msg.Target)
     {
         return;
     }
     MyMultiplayer.Static.OnScriptedChatMessage(ref msg);
 }
Beispiel #4
0
 public static void SendScriptedChatMessage(ref ScriptedChatMsg msg)
 {
     MyMultiplayer.RaiseStaticEvent(s => MyMultiplayerBase.OnScriptedChatMessageRecieved, msg);
 }
Beispiel #5
0
 protected virtual void OnScriptedChatMessage(ref ScriptedChatMsg msg)
 {
     RaiseScriptedChatMessageReceived(msg.Author, msg.Text, msg.Font);
 }