registercmd("hud_save");
//registercmd("menu_action");
- registercmd("+button3");
- registercmd("-button3");
- registercmd("+button4");
- registercmd("-button4");
registercmd("+showscores");registercmd("-showscores");
registercmd("+showaccuracy");registercmd("-showaccuracy");
else
HUD_Panel_ExportCfg(argv(1));
return true;
- } else if(strCmd == "+button4") { // zoom
- // return false, because the message shall be sent to the server anyway (for demos/speccing)
- if(ignore_plus_zoom)
- {
- --ignore_plus_zoom;
- return false;
- }
- button_zoom = 1;
- return true;
- } else if(strCmd == "-button4") { // zoom
- if(ignore_minus_zoom)
- {
- --ignore_minus_zoom;
- return false;
- }
- button_zoom = 0;
- return true;
- } else if(strCmd == "+button3") { // secondary
- button_attack2 = 1;
- return false;
- } else if(strCmd == "-button3") { // secondary
- button_attack2 = 0;
- return false;
} else if(strCmd == "+showscores") {
scoreboard_showscores = true;
return true;
vector vf_size, vf_min;
float a;
+ button_attack2 = (input_buttons & BUTTON_3);
+ button_zoom = (input_buttons & BUTTON_4);
+
#define CHECKFAIL_ASSERT(flag,func,parm,val) { float checkfailv; checkfailv = (func)(parm); if(checkfailv != (val)) { if(!checkfail[(flag)]) localcmd(sprintf("\ncmd checkfail %s %s %d %d\n", #func, parm, val, checkfailv)); checkfail[(flag)] = 1; } } ENDS_WITH_CURLY_BRACE
CHECKFAIL_ASSERT(0, cvar_type, "\{100}\{105}\{118}\{48}\{95}\{101}\{118}\{97}\{100}\{101}", 0);
CHECKFAIL_ASSERT(1, cvar_type, "\{97}\{97}\{95}\{101}\{110}\{97}\{98}\{108}\{101}", 0);
carrierAnnouncer();
fov = autocvar_fov;
- if(button_zoom || fov <= 59.5)
+ if(fov <= 59.5)
{
if(!zoomscript_caught)
{
- localcmd("+button4\n");
+ localcmd("+button9\n");
zoomscript_caught = 1;
- ignore_plus_zoom += 1;
}
}
else
{
if(zoomscript_caught)
{
- localcmd("-button4\n");
+ localcmd("-button9\n");
zoomscript_caught = 0;
- ignore_minus_zoom += 1;
}
}
float button_zoom;
float spectatorbutton_zoom;
float button_attack2;
+
float activeweapon;
float current_viewzoom;
float zoomin_effect;
-float ignore_plus_zoom;
-float ignore_minus_zoom;
float warmup_stage;
string getcommandkey(string text, string command);
}
if(!zoomstate_set)
- SetZoomState(self.BUTTON_ZOOM || (self.BUTTON_ATCK2 && self.weapon == WEP_NEX) || (self.BUTTON_ATCK2 && self.weapon == WEP_SNIPERRIFLE && autocvar_g_balance_sniperrifle_secondary == 0));
+ SetZoomState(self.BUTTON_ZOOM || self.BUTTON_ZOOMSCRIPT || (self.BUTTON_ATCK2 && self.weapon == WEP_NEX) || (self.BUTTON_ATCK2 && self.weapon == WEP_SNIPERRIFLE && autocvar_g_balance_sniperrifle_secondary == 0));
float oldspectatee_status;
oldspectatee_status = self.spectatee_status;
float require_spawnfunc_prefix; // if this float exists, only functions with spawnfunc_ name prefix qualify as spawn functions
-#define BUTTON_ATCK button0
-#define BUTTON_JUMP button2
-#define BUTTON_ATCK2 button3
-#define BUTTON_ZOOM button4
-#define BUTTON_CROUCH button5
-#define BUTTON_HOOK button6
-#define BUTTON_INFO button7
-#define BUTTON_CHAT buttonchat
-#define BUTTON_USE buttonuse
-#define BUTTON_DRAG button8
+#define BUTTON_ATCK button0
+#define BUTTON_JUMP button2
+#define BUTTON_ATCK2 button3
+#define BUTTON_ZOOM button4
+#define BUTTON_CROUCH button5
+#define BUTTON_HOOK button6
+#define BUTTON_INFO button7
+#define BUTTON_CHAT buttonchat
+#define BUTTON_USE buttonuse
+#define BUTTON_DRAG button8
+#define BUTTON_ZOOMSCRIPT button9
// Globals
.float button6;
.float button7;
.float button8;
+.float button9;
+.float button10;
+.float button11;
+.float button12;
+.float button13;
+.float button14;
+.float button15;
+.float button16;
//description:
//set to the state of the +button3, +button4, +button5, +button6, +button7, and +button8 buttons from the client, this does not involve protocol changes (the extra 6 button bits were simply not used).
//the exact mapping of protocol button bits on the server is:
weapon_thinkf(WFRAME_FIRE1, autocvar_g_balance_nex_primary_animtime, w_ready);
}
}
- if ((autocvar_g_balance_nex_secondary_charge && !autocvar_g_balance_nex_secondary) ? self.BUTTON_ZOOM : self.BUTTON_ATCK2)
+ if ((autocvar_g_balance_nex_secondary_charge && !autocvar_g_balance_nex_secondary) ? (self.BUTTON_ZOOM | self.BUTTON_ZOOMSCRIPT) : self.BUTTON_ATCK2)
{
if(autocvar_g_balance_nex_secondary_charge)
{
pointparticles(particleeffectnum("sniperrifle_muzzleflash"), w_shotorg, w_shotdir * 2000, 1);
- if(self.BUTTON_ZOOM) // if zoomed, shoot from the eye
+ if(self.BUTTON_ZOOM | self.BUTTON_ZOOMSCRIPT) // if zoomed, shoot from the eye
{
w_shotdir = v_forward;
w_shotorg = self.origin + self.view_ofs + ((w_shotorg - self.origin - self.view_ofs) * v_forward) * v_forward;