]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/Main.qc
get rid of 'local' prefixes (does nothing)
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / Main.qc
index f5dfec4e4a12f09649e3ff800e48c8cd732ff901..5bd490424c4691a126c99ef17c5cb91135540b6b 100644 (file)
@@ -358,7 +358,7 @@ float CSQC_ConsoleCommand(string strMessage)
        argc = tokenize_console(strMessage);
 
        // Acquire Command
-       local string strCmd;
+       string strCmd;
        strCmd = argv(0);
 
        if(strCmd == "hud_configure") { // config hud
@@ -595,7 +595,7 @@ void GameCommand(string msg)
         {
             vote_active = 0; // force the panel to disappear right as we have selected the value (to prevent it from fading out in the normal vote panel pos)
             vote_prev = 0;
-            cvar_set("cl_allow_uid2name", "1");
+            localcmd("setreport cl_allow_uid2name 1\n");
             vote_change = -9999;
                        uid2name_dialog = 0;
         }
@@ -610,7 +610,7 @@ void GameCommand(string msg)
         {
             vote_active = 0;
             vote_prev = 0;
-            cvar_set("cl_allow_uid2name", "0");
+            localcmd("setreport cl_allow_uid2name 0\n");
             vote_change = -9999;
                        uid2name_dialog = 0;
         }
@@ -636,7 +636,7 @@ void GameCommand(string msg)
 // In the case of mouse input, nPrimary is xdelta, nSecondary is ydelta.
 float CSQC_InputEvent(float bInputType, float nPrimary, float nSecondary)
 {
-       local float bSkipKey;
+       float bSkipKey;
        bSkipKey = false;
 
        if (HUD_Panel_InputEvent(bInputType, nPrimary, nSecondary))
@@ -1313,31 +1313,6 @@ void Net_ReadPingPLReport()
        playerslots[e].ping_movementloss = ml / 255.0;
 }
 
-void Net_Notify() {
-       float type;
-       type = ReadByte();
-
-       if(type == CSQC_KILLNOTIFY)
-       {
-               HUD_KillNotify(ReadString(), ReadString(), ReadString(), ReadShort(), ReadByte());
-       }
-       else if(type == CSQC_CENTERPRINT)
-       {
-               HUD_Centerprint(ReadString(), ReadString(), ReadShort(), ReadByte());
-       }
-       else if(type == CSQC_CENTERPRINT_GENERIC)
-       {
-               float id;
-               string s;
-               id = ReadByte();
-               s = ReadString();
-               if (id != 0 && s != "")
-                       centerprint_generic(id, s, ReadByte(), ReadByte());
-               else
-                       centerprint_generic(id, s, 0, 0);
-       }
-}
-
 void Net_WeaponComplain() {
        complain_weapon = ReadByte();
 
@@ -1356,10 +1331,10 @@ void Net_WeaponComplain() {
 // Return value should be 1 if CSQC handled the temporary entity, otherwise return 0 to have the engine process the event.
 float CSQC_Parse_TempEntity()
 {
-       local float bHandled;
+       float bHandled;
                bHandled  = true;
        // Acquire TE ID
-       local float nTEID;
+       float nTEID;
                nTEID = ReadByte();
 
                // NOTE: Could just do return instead of break...
@@ -1405,8 +1380,23 @@ float CSQC_Parse_TempEntity()
                        announce_snd = strzone(ReadString());
                        bHandled = true;
                        break;
-               case TE_CSQC_NOTIFY:
-                       Net_Notify();
+               case TE_CSQC_KILLNOTIFY:
+                       HUD_KillNotify(ReadString(), ReadString(), ReadString(), ReadShort(), ReadByte());
+                       bHandled = true;
+                       break;
+               case TE_CSQC_KILLCENTERPRINT:
+                       HUD_KillCenterprint(ReadString(), ReadString(), ReadShort(), ReadByte());
+                       bHandled = true;
+                       break;
+               case TE_CSQC_CENTERPRINT_GENERIC:
+                       float id;
+                       string s;
+                       id = ReadByte();
+                       s = ReadString();
+                       if (id != 0 && s != "")
+                               centerprint_generic(id, s, ReadByte(), ReadByte());
+                       else
+                               centerprint_generic(id, s, 0, 0);
                        bHandled = true;
                        break;
                case TE_CSQC_WEAPONCOMPLAIN: