Esempio n. 1
0
 internal void SetConfigstringInfo(InfoString info)
 {
     if (info.Count <= 0)
     {
         return;
     }
     this.HostName   = info["sv_hostname"];
     this.MapName    = info["mapname"];
     this.MaxClients = info["sv_maxclients"].Atoi();
     this.GameType   = (GameType)info["g_gametype"].Atoi();
     this.Protocol   = (ProtocolVersion)info["protocol"].Atoi();
     this.Version    = JKClient.GetVersion(this.Protocol);
     //JO doesn't have Power Duel, the rest game types match
     if (JKClient.IsJO(this.Protocol) && this.GameType >= GameType.PowerDuel)
     {
         this.GameType++;
     }
     this.MinPing      = info["sv_minping"].Atoi();
     this.MaxPing      = info["sv_maxping"].Atoi();
     this.NeedPassword = info["g_needpass"].Atoi() != 0;
     this.TrueJedi     = info["g_jediVmerc"].Atoi() != 0;
     if (this.GameType == GameType.Duel || this.GameType == GameType.PowerDuel)
     {
         this.WeaponDisable = info["g_duelWeaponDisable"].Atoi() != 0;
     }
     else
     {
         this.WeaponDisable = info["g_weaponDisable"].Atoi() != 0;
     }
     this.ForceDisable = info["g_forcePowerDisable"].Atoi() != 0;
     this.InfoSet      = true;
 }
Esempio n. 2
0
 internal unsafe ClientGame(/*IJKClientImport*/ JKClient client, int serverMessageNum, int serverCommandSequence, int clientNum)
 {
     this.Client                = client;
     this.ClientNum             = clientNum;
     this.ProcessedSnapshotNum  = serverMessageNum;
     this.ServerCommandSequence = serverCommandSequence;
     this.LatestSnapshotNum     = 0;
     this.Snap     = null;
     this.NextSnap = null;
     Common.MemSet(this.Entities, 0, sizeof(ClientEntity) * Common.MaxGEntities);
     this.ClientInfo = new ClientInfo[this.Client.MaxClients];
     for (int i = 0; i < this.Client.MaxClients; i++)
     {
         this.NewClientInfo(i);
     }
     this.Initialized = true;
 }
Esempio n. 3
0
 public virtual ClientGame CreateClientGame(/*IJKClientImport*/ JKClient client, int serverMessageNum, int serverCommandSequence, int clientNum)
 {
     return(new Q3ClientGame(client, serverMessageNum, serverCommandSequence, clientNum));
 }