]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
do the +use -> use transition PROPERLY
authorRudolf Polzer <divverent@alientrap.org>
Sat, 1 Oct 2011 14:57:15 +0000 (16:57 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Sat, 1 Oct 2011 14:57:15 +0000 (16:57 +0200)
defaultXonotic.cfg
qcsrc/server/cl_client.qc
qcsrc/server/defs.qh
qcsrc/server/miscfunctions.qc

index 025ceeef212ec6de76699ba9f9f954cf50ae2de1..883f8efcea2f66ab3f01a5ab59c9c328a3c72f39 100644 (file)
@@ -54,6 +54,7 @@ alias +hook +button6
 alias -hook -button6
 alias use "impulse 21"
 alias +use use // always send that impulse AND press the key (+use is engine internal command and executes anyway)
+set cl_newusekeysupported 1 // indicates that we always send the use impulse too, so they do not need to be synthesized
 alias ready "cmd ready"
 alias lockteams "sv_cmd lockteams"
 alias unlockteams "sv_cmd unlockteams"
index bddb5933233ba91f7d422a85820852276344722e..6ee5dfc3c3131844233aba5725254e102195f69e 100644 (file)
@@ -2774,9 +2774,12 @@ void PlayerPreThink (void)
 
        MUTATOR_CALLHOOK(PlayerPreThink);
 
-       if(self.BUTTON_USE && !self.usekeypressed)
-               PlayerUseKey();
-       self.usekeypressed = self.BUTTON_USE;
+       if(!self.cvar_cl_newusekeysupported)
+       {
+               if(self.BUTTON_USE && !self.usekeypressed)
+                       PlayerUseKey();
+               self.usekeypressed = self.BUTTON_USE;
+       }
 
        PrintWelcomeMessage();
 
index bc05d1b04849b05ced40ef7b3ae1a20f0f7c36c8..9f4631a47c1195f5bf345f36f45c0a971c6fd31c 100644 (file)
@@ -315,6 +315,7 @@ float default_weapon_alpha;
 .float cvar_cl_playerdetailreduction;
 .float cvar_cl_clippedspectating;
 .float cvar_cl_movement_track_canjump;
+.float cvar_cl_newusekeysupported;
 
 .string cvar_g_xonoticversion;
 .string cvar_cl_weaponpriority;
index 9a848fa46ebbe7eda5bc4b49735165f1e8573f84..19465d09dd1a156e397abb29ca4fac14d7633ae8 100644 (file)
@@ -617,6 +617,7 @@ void GetCvars(float f)
        GetCvars_handleFloat(s, f, cvar_cl_allow_uid2name, "cl_allow_uid2name");
        GetCvars_handleFloat(s, f, cvar_cl_allow_uidtracking, "cl_allow_uidtracking");
        GetCvars_handleFloat(s, f, cvar_cl_movement_track_canjump, "cl_movement_track_canjump");
+       GetCvars_handleFloat(s, f, cvar_cl_newusekeysupported, "cl_newusekeysupported");
 
        // fixup of switchweapon (needed for LMS or when spectating is disabled, as PutClientInServer comes too early)
        if (f > 0)