X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fw_tuba.qc;h=2e081095f12a5b46fe525e63744ef49d3f166d26;hp=db4f95385267cb2b6d6e82940cfa4614a4aaa644;hb=f6de28b8f7cc072475da92808b0a2223c112d291;hpb=28db67726bdcc01ded4d4c942326dfc7f7375e18 diff --git a/qcsrc/server/w_tuba.qc b/qcsrc/server/w_tuba.qc index db4f95385..2e081095f 100644 --- a/qcsrc/server/w_tuba.qc +++ b/qcsrc/server/w_tuba.qc @@ -72,7 +72,7 @@ float W_Tuba_HasPlayed(entity pl, string melody, float instrument, float ignorep mmax = 240 / mintempo; // 60 = "0.25 means 1 sec", at 120 0.5 means 1 sec, at 240 1 means 1 sec else mmax = 240; // you won't try THAT hard... (tempo 1) - //print(sprintf("initial tempo rules: %f %f\n", mmin, mmax)); + //printf("initial tempo rules: %f %f\n", mmin, mmax); for(i = 0; i < n; ++i) { @@ -96,10 +96,10 @@ float W_Tuba_HasPlayed(entity pl, string melody, float instrument, float ignorep // vi_x <= vi_y <= vj_x <= vj_y // ti <= tj - //print(sprintf("first note: %f to %f, should be %f\n", vi_x, vi_y, ti)); - //print(sprintf("second note: %f to %f, should be %f\n", vj_x, vj_y, tj)); - //print(sprintf("m1 = %f\n", (vi_x - vj_y) / (ti - tj))); - //print(sprintf("m2 = %f\n", (vi_y - vj_x) / (ti - tj))); + //printf("first note: %f to %f, should be %f\n", vi_x, vi_y, ti); + //printf("second note: %f to %f, should be %f\n", vj_x, vj_y, tj); + //printf("m1 = %f\n", (vi_x - vj_y) / (ti - tj)); + //printf("m2 = %f\n", (vi_y - vj_x) / (ti - tj)); mmin = max(mmin, (vi_x - vj_y) / (ti - tj)); // lower bound mmax = min(mmax, (vi_y - vj_x) / (ti - tj)); // upper bound } @@ -190,7 +190,7 @@ float Tuba_GetNote(entity pl, float hittype) note += 12; if(hittype & HITTYPE_SECONDARY) note += 7; - + // we support two kinds of tubas, those tuned in Eb and those tuned in C // kind of tuba currently is player slot number, or team number if in // teamplay @@ -205,7 +205,7 @@ float Tuba_GetNote(entity pl, float hittype) if(pl.clientcolors & 1) note += 3; } - + // total range of notes: // 0 // *** ** **** @@ -313,7 +313,7 @@ void W_Tuba_NoteOn(float hittype) } } - if not(self.tuba_note) + if (!self.tuba_note) { self.tuba_note = spawn(); self.tuba_note.owner = self.tuba_note.realowner = self;