]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/Main.qc
Merge branch 'fruitiex/newpanelhud_stable' into fruitiex/newpanelhud
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / Main.qc
index 3ed62834ae5379f959a4093c7b2ec7e1e0185c49..6609e018dd09e0e4829f5fec88cbc8e034519ea2 100644 (file)
@@ -633,13 +633,12 @@ void GameCommand(string msg)
 // bInputType = 0 is key pressed, 1 is key released, 2 is mouse input.
 // In the case of keyboard input, nPrimary is the ascii code, and nSecondary is 0.
 // In the case of mouse input, nPrimary is xdelta, nSecondary is ydelta.
-float hudconf_active;
 float CSQC_InputEvent(float bInputType, float nPrimary, float nSecondary)
 {
        local float bSkipKey;
        bSkipKey = false;
 
-       if(hudconf_active)
+       if(hud_configure)
                if (HUD_Panel_InputEvent(bInputType, nPrimary, nSecondary))
                        return true;
 
@@ -1241,6 +1240,20 @@ void Net_VoteDialogReset() {
        vote_active = 0;
 }
 
+void Net_Notify() {
+       float type;
+       type = ReadByte();
+
+       if(type == CSQC_KILLNOTIFY)
+       {
+               HUD_KillNotify(ReadString(), ReadString(), ReadString(), ReadByte(), ReadByte());
+       }
+       else if(type == CSQC_CENTERPRINT)
+       {
+               HUD_Centerprint(ReadString(), ReadByte());
+       }
+}
+
 // CSQC_Parse_TempEntity : Handles all temporary entity network data in the CSQC layer.
 // You must ALWAYS first acquire the temporary ID, which is sent as a byte.
 // Return value should be 1 if CSQC handled the temporary entity, otherwise return 0 to have the engine process the event.
@@ -1307,6 +1320,10 @@ float CSQC_Parse_TempEntity()
                        announce_snd = strzone(ReadString());
                        bHandled = true;
                        break;
+               case TE_CSQC_NOTIFY:
+                       Net_Notify();
+                       bHandled = true;
+                       break;
                default:
                        // No special logic for this temporary entity; return 0 so the engine can handle it
                        bHandled = false;