From 1c823399ee4cd14ac2b6fb728e842336b9fa2431 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Sat, 19 Nov 2011 16:29:58 +0100 Subject: [PATCH] better verifying --- qcsrc/server/w_tuba.qc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 } -- 2.39.2