]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
add a weird hack to work around an engine bug that doesn't let us get zoom button...
authorRudolf Polzer <divverent@xonotic.org>
Sun, 14 Aug 2011 16:15:16 +0000 (18:15 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Sun, 14 Aug 2011 16:15:16 +0000 (18:15 +0200)
qcsrc/client/View.qc
qcsrc/client/autocvars.qh

index 391e53167047c962c9b80aa60fa09fd58afbeffe..97ed6df284809647fa59e019753068024a355553 100644 (file)
@@ -384,6 +384,13 @@ void CSQC_UpdateView(float w, float h)
        button_attack2 = (input_buttons & BUTTON_3);
        button_zoom = (input_buttons & BUTTON_4);
 
+       // FIXME do we need this hack?
+       if(isdemo())
+       {
+               // in demos, input_buttons do not work
+               button_zoom = (autocvar__togglezoom == "-");
+       }
+
 #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);
index 0dc5b184980199a00517856f160b89492f01c217..f78691ef12a50206070bfde9194de22212721564 100644 (file)
@@ -349,3 +349,4 @@ var float autocvar_cl_eventchase_death = 1;
 var float autocvar_cl_eventchase_distance = 140;
 var float autocvar_cl_eventchase_speed = 1.3;
 float autocvar_cl_lerpexcess;
+string autocvar__togglezoom;