equal
deleted
inserted
replaced
495 if (lst[1] == "AMMO") { |
495 if (lst[1] == "AMMO") { |
496 if(lst.size() < 4) return; |
496 if(lst.size() < 4) return; |
497 emit ammoChanged(lst[3], lst[2]); |
497 emit ammoChanged(lst[3], lst[2]); |
498 return; |
498 return; |
499 } |
499 } |
|
500 if (lst[1] == "TEMPLATE_FILTER") { |
|
501 emit templateFilterChanged(lst[2].toUInt()); |
|
502 return; |
|
503 } |
500 qWarning() << "Net: Unknown 'CONFIG_PARAM' message:" << lst; |
504 qWarning() << "Net: Unknown 'CONFIG_PARAM' message:" << lst; |
501 return; |
505 return; |
502 } |
506 } |
503 |
507 |
504 if (lst[0] == "HH_NUM") { |
508 if (lst[0] == "HH_NUM") { |
573 QString name = m_pGameCFGWidget->WeaponsName->currentText(); |
577 QString name = m_pGameCFGWidget->WeaponsName->currentText(); |
574 QString ammo = m_pGameCFGWidget->WeaponsName->itemData( |
578 QString ammo = m_pGameCFGWidget->WeaponsName->itemData( |
575 m_pGameCFGWidget->WeaponsName->currentIndex() |
579 m_pGameCFGWidget->WeaponsName->currentIndex() |
576 ).toString(); |
580 ).toString(); |
577 onWeaponsNameChanged(name, ammo); |
581 onWeaponsNameChanged(name, ammo); |
|
582 onTemplateFilterChanged(m_pGameCFGWidget->getTemplateFilter()); |
578 } |
583 } |
579 |
584 |
580 void HWNewNet::RunGame() |
585 void HWNewNet::RunGame() |
581 { |
586 { |
582 emit AskForRunGame(); |
587 emit AskForRunGame(); |
658 void HWNewNet::onWeaponsNameChanged(const QString& name, const QString& ammo) |
663 void HWNewNet::onWeaponsNameChanged(const QString& name, const QString& ammo) |
659 { |
664 { |
660 if (isChief) RawSendNet(QString("CONFIG_PARAM%1AMMO%1%2%1%3").arg(delimeter).arg(ammo).arg(name)); |
665 if (isChief) RawSendNet(QString("CONFIG_PARAM%1AMMO%1%2%1%3").arg(delimeter).arg(ammo).arg(name)); |
661 } |
666 } |
662 |
667 |
|
668 void HWNewNet::onTemplateFilterChanged(int filter) |
|
669 { |
|
670 if (isChief) RawSendNet(QString("CONFIG_PARAM%1TEMPLATE_FILTER%1%2").arg(delimeter).arg(filter)); |
|
671 } |
|
672 |
663 void HWNewNet::chatLineToNet(const QString& str) |
673 void HWNewNet::chatLineToNet(const QString& str) |
664 { |
674 { |
665 if(str != "") { |
675 if(str != "") { |
666 RawSendNet(QString("CHAT_STRING") + delimeter + str); |
676 RawSendNet(QString("CHAT_STRING") + delimeter + str); |
667 emit(chatStringFromMe(formatChatMsg(mynick, str))); |
677 emit(chatStringFromMe(formatChatMsg(mynick, str))); |