예제 #1
0
파일: GameCmds.cs 프로젝트: maesse/CubeHags
 void BroadcastTeamChange(gclient_t client, team_t oldTeam)
 {
     switch (client.sess.sessionTeam)
     {
         case team_t.TEAM_FREE:
             Server.Instance.SendServerCommand(null, string.Format("print \"{0}^7 joined the battle.\n\"", client.pers.netname));
             break;
         case team_t.TEAM_SPECTATOR:
             Server.Instance.SendServerCommand(null, string.Format("print \"{0}^7 joined the spectators.\n\"", client.pers.netname));
             break;
         case team_t.TEAM_RED:
             Server.Instance.SendServerCommand(null, string.Format("print \"{0}^7 joined the ^1red^7 team.\n\"", client.pers.netname));
             break;
         case team_t.TEAM_BLUE:
             Server.Instance.SendServerCommand(null, string.Format("print \"{0}^7 joined the ^2blue^7 team.\n\"", client.pers.netname));
             break;
     }
 }
예제 #2
0
파일: Server.cs 프로젝트: maesse/CubeHags
 public void LocateGameData(sharedEntity[] gEnts, int entityCount, gclient_t[] clients)
 {
     sv.gentities = gEnts;
     //sv.gentities = new List<sharedEntity>();
     //for (int i = 0; i < gEnts.Count; i++)
     //{
     //    sv.gentities.Add(Game.Instance.GEntityToSharedEntity(gEnts[i]));
     //}
     sv.num_entities = entityCount;
     sv.gameClients = clients;
 }