From: Rudolf Polzer Date: Sat, 19 Nov 2011 15:29:58 +0000 (+0100) Subject: better verifying X-Git-Tag: xonotic-v0.6.0~35^2~47 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=1c823399ee4cd14ac2b6fb728e842336b9fa2431;p=xonotic%2Fxonotic-data.pk3dir.git better verifying --- diff --git a/qcsrc/server/w_tuba.qc b/qcsrc/server/w_tuba.qc index 1e47a3b3d..9019866dc 100644 --- a/qcsrc/server/w_tuba.qc +++ b/qcsrc/server/w_tuba.qc @@ -22,11 +22,13 @@ float W_Tuba_HasPlayed(entity pl, string melody) { vector v = pl.(tuba_lastnotes[mod(pl.tuba_lastnotes_last - i + MAX_TUBANOTES, MAX_TUBANOTES)]); float ai = stof(argv(n - i - 1)); + float np = floor(ai); + float nl = ((ai == np) ? 0 : (1 / (ai - np))); // n counts the last played notes BACKWARDS // _x is start // _y is end // _z is note pitch - if(v_z != floor(ai)) + if(v_z != np) return FALSE; // FIXME verify rhythm }