void game_cl_TeamDeathmatch::Init () { // pInventoryMenu = xr_new<CUIInventoryWnd>(); // pPdaMenu = xr_new<CUIPdaWnd>(); // pMapDesc = xr_new<CUIMapDesc>(); //----------------------------------------------------------- LoadTeamData(GetTeamMenu(1)); LoadTeamData(GetTeamMenu(2)); }
void game_sv_TeamDeathmatch::LoadTeams() { m_sBaseWeaponCostSection._set("teamdeathmatch_base_cost"); if (!pSettings->section_exist(m_sBaseWeaponCostSection)) { R_ASSERT2(0, "No section for base weapon cost for this type of the Game!"); return; }; m_strWeaponsData->Load(m_sBaseWeaponCostSection); LoadTeamData("teamdeathmatch_team0"); LoadTeamData("teamdeathmatch_team1"); LoadTeamData("teamdeathmatch_team2"); };
void game_cl_Deathmatch::Init () { LoadTeamData(TEAM0_MENU); if (pSettings->line_exist("deathmatch_gamedata", "actor_spawn_effect")) Actor_Spawn_Effect = pSettings->r_string("deathmatch_gamedata", "actor_spawn_effect"); }
void TeamStats::refresh() { LoadTeamData(); TeamTable->clear(); TeamTable->setRowCount(iTeams); TeamTable->setHorizontalHeaderItem(0, new QTableWidgetItem("Team Number")); TeamTable->setHorizontalHeaderItem(1, new QTableWidgetItem("Total Score")); TeamTable->setHorizontalHeaderItem(2, new QTableWidgetItem("Wins")); TeamTable->setHorizontalHeaderItem(3, new QTableWidgetItem("Losses")); TeamTable->setHorizontalHeaderItem(4, new QTableWidgetItem("Win Percent")); TeamTable->setHorizontalHeaderItem(5, new QTableWidgetItem("Lose Percent")); TeamTable->setHorizontalHeaderItem(6, new QTableWidgetItem("Ties")); TeamTable->setHorizontalHeaderItem(7, new QTableWidgetItem("Assists")); TeamTable->setHorizontalHeaderItem(8, new QTableWidgetItem("Catch Attempts")); TeamTable->setHorizontalHeaderItem(9, new QTableWidgetItem("Catch Percent")); TeamTable->setHorizontalHeaderItem(10, new QTableWidgetItem("Shot Attempts")); TeamTable->setHorizontalHeaderItem(11, new QTableWidgetItem("Shot Percents")); TeamTable->setHorizontalHeaderItem(12, new QTableWidgetItem("Blocks")); TeamTable->setHorizontalHeaderItem(13, new QTableWidgetItem("Penalty Points")); TeamTable->setHorizontalHeaderItem(14, new QTableWidgetItem("Trench Attempts")); TeamTable->setHorizontalHeaderItem(15, new QTableWidgetItem("Trench Percent")); for(int i = 0; i < iTeams; i++) { TeamTable->setItem(i, 0, new QTableWidgetItem(Teams[i].name)); TeamTable->setItem(i, 1, new QTableWidgetItem(Teams[i].totalPoints)); TeamTable->setItem(i, 2, new QTableWidgetItem(Teams[i].wins)); TeamTable->setItem(i, 3, new QTableWidgetItem(Teams[i].losses)); TeamTable->setItem(i, 4, new QTableWidgetItem(Teams[i].winPercent)); TeamTable->setItem(i, 5, new QTableWidgetItem(Teams[i].losePercent)); TeamTable->setItem(i, 6, new QTableWidgetItem(Teams[i].ties)); TeamTable->setItem(i, 7, new QTableWidgetItem(Teams[i].assists)); TeamTable->setItem(i, 8, new QTableWidgetItem(Teams[i].catchAttempts)); TeamTable->setItem(i, 9, new QTableWidgetItem(Teams[i].catchPercent)); TeamTable->setItem(i, 10, new QTableWidgetItem(Teams[i].shotAttempts)); TeamTable->setItem(i, 11, new QTableWidgetItem(Teams[i].shotPercent)); TeamTable->setItem(i, 12, new QTableWidgetItem(Teams[i].blocks)); TeamTable->setItem(i, 13, new QTableWidgetItem(Teams[i].penaltyPoints)); TeamTable->setItem(i, 14, new QTableWidgetItem(Teams[i].trussAttempts)); TeamTable->setItem(i, 15, new QTableWidgetItem(Teams[i].trussPercent)); } }
TeamStats::TeamStats(QString eventName) { qDebug() << "Creating Team Stats"; EventName = eventName; CreateTeamStatsGroupBox(); CreateMenu(); LoadTeamData(); QVBoxLayout *mainLayout = new QVBoxLayout; mainLayout->setMenuBar(menuBar); mainLayout->addWidget(TeamStatsGroupBox); mainLayout->addWidget(Done); setLayout(mainLayout); setWindowTitle(tr("Add Teams")); qDebug() << "Team Stats Created"; }
void TeamStats::CreateTeamStatsGroupBox() { qDebug() << "Team Stats: Creating Group Box"; LoadTeamData(); InitTeamTable(); TeamStatsGroupBox = new QGroupBox(tr("Team Stats")); QHBoxLayout *layout = new QHBoxLayout; Done = new QPushButton(tr("Done")); Refresh = new QPushButton(tr("Refresh")); layout->addWidget(TeamTable); layout->addWidget(Refresh); layout->addWidget(Done); QWidget::connect(Refresh, SIGNAL(clicked()), this, SLOT(refresh())); QWidget::connect(Done, SIGNAL(clicked()), this, SLOT(close())); TeamStatsGroupBox->setLayout(layout); qDebug() << "Team Stats: Group Box Created"; }
void game_cl_ArtefactHunt::Init () { // pInventoryMenu = xr_new<CUIInventoryWnd>(); // pPdaMenu = xr_new<CUIPdaWnd>(); // pMapDesc = xr_new<CUIMapDesc>(); LoadTeamData(TEAM1_MENU); LoadTeamData(TEAM2_MENU); old_artefactBearerID = 0; old_artefactID = 0; old_teamInPossession = 0; //--------------------------------------------------- /* string_path fn_game; if (FS.exist(fn_game, "$level$", "level.game")) { IReader *F = FS.r_open (fn_game); IReader *O = 0; // Load RPoints if (0!=(O = F->open_chunk (RPOINT_CHUNK))) { for (int id=0; O->find_chunk(id); ++id) { RPoint R; u8 RP_team; u8 RP_type; u16 RP_GameType; O->r_fvector3 (R.P); O->r_fvector3 (R.A); RP_team = O->r_u8 (); VERIFY(RP_team>=0 && RP_team<4); RP_type = O->r_u8 (); RP_GameType = O->r_u16 (); //u16 res = //O->r_u8 (); if (RP_GameType != GAME_ANY && RP_GameType != GAME_ARTEFACTHUNT) { continue; }; switch (RP_type) { case rptTeamBaseParticle: { string256 ParticleStr; xr_sprintf(ParticleStr, "teambase_particle_%d", RP_team); if (pSettings->line_exist("artefacthunt_gamedata", ParticleStr)) { Fmatrix transform; transform.identity(); transform.setXYZ(R.A); transform.translate_over(R.P); CParticlesObject* pStaticParticles = CParticlesObject::Create(pSettings->r_string("artefacthunt_gamedata", ParticleStr),FALSE,false); pStaticParticles->UpdateParent (transform,zero_vel); pStaticParticles->Play (); Level().m_StaticParticles.push_back (pStaticParticles); }; }break; }; }; O->close(); } FS.r_close (F); }*/ //------------------------------------------------------- if (pSettings->line_exist("artefacthunt_gamedata", "artefact_spawn_effect")) m_Eff_Af_Spawn = pSettings->r_string("artefacthunt_gamedata", "artefact_spawn_effect"); if (pSettings->line_exist("artefacthunt_gamedata", "artefact_disappear_effect")) m_Eff_Af_Disappear = pSettings->r_string("artefacthunt_gamedata", "artefact_disappear_effect"); };