Prepend '!' to 42nd scheme parameter in network traffic
authorunc0rr
Wed, 01 Jan 2014 23:28:24 +0400
changeset 9904 ef3321c86912
parent 9902 eb8e8b09b2f0
child 9906 93c16a4b0c6a
Prepend '!' to 42nd scheme parameter in network traffic
QTfrontend/model/ammoSchemeModel.cpp
QTfrontend/ui/widget/gamecfgwidget.cpp
--- a/QTfrontend/model/ammoSchemeModel.cpp	Wed Jan 01 14:16:01 2014 +0400
+++ b/QTfrontend/model/ammoSchemeModel.cpp	Wed Jan 01 23:28:24 2014 +0400
@@ -805,6 +805,8 @@
         return;
     }
 
+    cfg[42] = cfg[42].mid(1);
+
     for(int i = 0; i < cfg.size(); ++i)
         netScheme[i] = QVariant(cfg[i]);
 
--- a/QTfrontend/ui/widget/gamecfgwidget.cpp	Wed Jan 01 14:16:01 2014 +0400
+++ b/QTfrontend/ui/widget/gamecfgwidget.cpp	Wed Jan 01 23:28:24 2014 +0400
@@ -570,7 +570,11 @@
     for(int i = 0; i < size; ++i)
         sl << schemeData(i).toString();
 
-    if (sl.size()!=1) emit paramChanged("SCHEME", sl);  // this is a stupid hack for the fact that SCHEME is being sent once, empty. Still need to find out why.
+    if (sl.size() >= 42)
+    {
+        sl[42].prepend('!');
+        emit paramChanged("SCHEME", sl);  // this is a stupid hack for the fact that SCHEME is being sent once, empty. Still need to find out why.
+    }
 
     if (isEnabled() && bindEntries->isEnabled() && bindEntries->isChecked())
     {