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"
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();
.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;
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)