]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/Main.qc
Merge branch 'master' into terencehill/cursormode
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / Main.qc
index 4fdb5078ff961a4f9b1c7f6eafc410efc068c37c..2f7eb3d62d1509a76ed4cc771a3b114635bafeba 100644 (file)
@@ -82,10 +82,6 @@ void CSQC_Init(void)
                        break;
        maxclients = i;
 
-       //ctf_temp_1 = "";
-       // localcmd("alias order \"cmd order $*\""); enable if ctf-command thingy is used
-       //registercmd("ctf_menu");
-       registercmd("ons_map");
        registercmd("hud_configure");
        registercmd("hud_save");
        //registercmd("menu_action");
@@ -142,10 +138,13 @@ void CSQC_Init(void)
        turrets_precache();
   Announcer_Precache();
        Tuba_Precache();
-
-       if(autocvar_cl_reticle_item_normal) precache_pic("gfx/reticle_normal");
-       if(autocvar_cl_reticle_item_nex) precache_pic("gfx/reticle_nex");
-
+       
+       if(autocvar_cl_reticle)
+       {
+               if(autocvar_cl_reticle_item_normal) { precache_pic("gfx/reticle_normal"); }
+               if(autocvar_cl_reticle_item_nex) { precache_pic("gfx/reticle_nex"); }
+       }
+       
        get_mi_min_max_texcoords(1); // try the CLEVER way first
        minimapname = strcat("gfx/", mi_shortname, "_radar.tga");
        shortmapname = mi_shortname;
@@ -630,9 +629,10 @@ void GameCommand(string msg)
 // CSQC_InputEvent : Used to perform actions based on any key pressed, key released and mouse on the client.
 // Return value should be 1 if CSQC handled the input, otherwise return 0 to have the input passed to the engine.
 // All keys are in ascii.
-// bInputType = 0 is key pressed, 1 is key released, 2 is mouse input.
+// bInputType = 0 is key pressed, 1 is key released, 2 and 3 are 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.
+// In the case of mouse input after a setcursormode(1) call, nPrimary is xpos, nSecondary is ypos.
 float CSQC_InputEvent(float bInputType, float nPrimary, float nSecondary)
 {
        float bSkipKey;
@@ -961,7 +961,7 @@ void CSQC_Ent_Update(float bIsNewEntity)
                if(t != self.enttype || bIsNewEntity)
                {
                        //print(_("A CSQC entity changed its type!\n"));
-                       print(sprintf(_("A CSQC entity changed its type! (edict: %d, type: %d -> %d)\n"), num_for_edict(self), self.enttype, t));
+                       print(sprintf(_("A CSQC entity changed its type! (edict: %d, server: %d, type: %d -> %d)\n"), num_for_edict(self), self.entnum, self.enttype, t));
                        Ent_Remove();
                        bIsNewEntity = 1;
                }
@@ -970,7 +970,7 @@ void CSQC_Ent_Update(float bIsNewEntity)
        {
                if(!bIsNewEntity)
                {
-                       print(sprintf(_("A CSQC entity appeared out of nowhere! (edict: %d, type: %d)\n"), num_for_edict(self), t));
+                       print(sprintf(_("A CSQC entity appeared out of nowhere! (edict: %d, server: %d, type: %d)\n"), num_for_edict(self), self.entnum, t));
                        bIsNewEntity = 1;
                }
        }