From: Rudolf Polzer Date: Mon, 10 Oct 2011 20:00:08 +0000 (+0200) Subject: the accordeon! X-Git-Tag: xonotic-v0.6.0~40^2~65 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=dea1bf3297e80b732781c2b4aeb8ed7e69ba3307;p=xonotic%2Fxonotic-data.pk3dir.git the accordeon! --- diff --git a/models/weapons/akordeon.tga b/models/weapons/akordeon.tga new file mode 100644 index 000000000..68b0ae0df Binary files /dev/null and b/models/weapons/akordeon.tga differ diff --git a/models/weapons/akordeon_gloss.tga b/models/weapons/akordeon_gloss.tga new file mode 100644 index 000000000..b03c08918 Binary files /dev/null and b/models/weapons/akordeon_gloss.tga differ diff --git a/models/weapons/akordeon_reflect.tga b/models/weapons/akordeon_reflect.tga new file mode 100644 index 000000000..2f3eba9b6 Binary files /dev/null and b/models/weapons/akordeon_reflect.tga differ diff --git a/models/weapons/h_akordeon.iqm b/models/weapons/h_akordeon.iqm new file mode 100644 index 000000000..523ef998a Binary files /dev/null and b/models/weapons/h_akordeon.iqm differ diff --git a/models/weapons/v_akordeon.md3 b/models/weapons/v_akordeon.md3 new file mode 100644 index 000000000..399079741 Binary files /dev/null and b/models/weapons/v_akordeon.md3 differ diff --git a/qcsrc/client/tuba.qc b/qcsrc/client/tuba.qc index 13e37f0e7..2fea077c5 100644 --- a/qcsrc/client/tuba.qc +++ b/qcsrc/client/tuba.qc @@ -1,6 +1,6 @@ #define TUBA_MIN -18 #define TUBA_MAX 27 -#define TUBA_INSTRUMENTS 1 +#define TUBA_INSTRUMENTS 2 #define TUBA_STARTNOTE(i,n) strcat("weapons/tuba", (i ? ftos(i) : ""), "_loopnote", ftos(n), ".wav") .float note; // note diff --git a/qcsrc/server/w_tuba.qc b/qcsrc/server/w_tuba.qc index 987e7b41e..8753e7ba5 100644 --- a/qcsrc/server/w_tuba.qc +++ b/qcsrc/server/w_tuba.qc @@ -243,19 +243,17 @@ float w_tuba(float req) // TODO switch to alternate instruments :) if(self.weaponentity.state == WS_READY) { - /* switch(self.tuba_instrument) { case 0: self.tuba_instrument = 1; - self.weaponname = "laser"; + self.weaponname = "akordeon"; break; case 1: self.tuba_instrument = 0; self.weaponname = "tuba"; break; } - */ W_SetupShot(self, FALSE, 0, "", 0, 0); pointparticles(particleeffectnum("teleport"), w_shotorg, '0 0 0', 1); self.weaponentity.state = WS_INUSE; diff --git a/scripts/akordeon.shader b/scripts/akordeon.shader new file mode 100644 index 000000000..19a304173 --- /dev/null +++ b/scripts/akordeon.shader @@ -0,0 +1,9 @@ +akordeon +{ + dpglossexponentmod 64 + dpreflectcube env/exomorph/exomorph + { + map models/weapons/akordeon.tga + rgbgen lightingDiffuse + } +} \ No newline at end of file diff --git a/sound/weapons/tuba1_loopnote-12.ogg b/sound/weapons/tuba1_loopnote-12.ogg new file mode 100644 index 000000000..8f98c5031 Binary files /dev/null and b/sound/weapons/tuba1_loopnote-12.ogg differ diff --git a/sound/weapons/tuba1_loopnote-18.ogg b/sound/weapons/tuba1_loopnote-18.ogg new file mode 100644 index 000000000..aea2cb706 Binary files /dev/null and b/sound/weapons/tuba1_loopnote-18.ogg differ diff --git a/sound/weapons/tuba1_loopnote-6.ogg b/sound/weapons/tuba1_loopnote-6.ogg new file mode 100644 index 000000000..9e77f1291 Binary files /dev/null and b/sound/weapons/tuba1_loopnote-6.ogg differ diff --git a/sound/weapons/tuba1_loopnote-src.txt b/sound/weapons/tuba1_loopnote-src.txt new file mode 100644 index 000000000..56bcb5f7b --- /dev/null +++ b/sound/weapons/tuba1_loopnote-src.txt @@ -0,0 +1,47 @@ +r=44642 + +base=261.6 +ls=$((7646/2)) +le=$((10378/2)) +for n in -18 -12; do + this=`echo "440*e(l(2)/12*($n+72-69))" | bc -l` + f=`echo "$r * $this / $base + 0.5" | bc -l` + f=${f%.*} + echo "$r -> $f" + if [ "$f" -gt 48000 ]; then + o="-r 48000" + s=`echo "$ls * 48000 / $f + 0.5" | bc -l` + s=${s%.*} + e=`echo "$le * 48000 / $f + 0.5" | bc -l` + e=${e%.*} + else + o= + s=$ls + e=$le + fi + sox -r "$f" 023_Tango_Accordion-0.wav $o "tuba1_loopnote$n.wav" + oggenc -c "LOOP_START=$s" -c "LOOP_END=$e" -q8 -o "tuba1_loopnote$n.ogg" "tuba1_loopnote$n.wav" +done + +base=659.191 +ls=$((6326/2)) +le=$((7140/2)) +for n in -6 0 6 12 18 24; do + this=`echo "440*e(l(2)/12*($n+72-69))" | bc -l` + f=`echo "$r * $this / $base + 0.5" | bc -l` + f=${f%.*} + echo "$r -> $f" + if [ "$f" -gt 48000 ]; then + o="-r 48000" + s=`echo "$ls * 48000 / $f + 0.5" | bc -l` + s=${s%.*} + e=`echo "$le * 48000 / $f + 0.5" | bc -l` + e=${e%.*} + else + o= + s=$ls + e=$le + fi + sox -r "$f" 023_Tango_Accordion-1.wav $o "tuba1_loopnote$n.wav" + oggenc -c "LOOP_START=$s" -c "LOOP_END=$e" -q8 -o "tuba1_loopnote$n.ogg" "tuba1_loopnote$n.wav" +done diff --git a/sound/weapons/tuba1_loopnote0.ogg b/sound/weapons/tuba1_loopnote0.ogg new file mode 100644 index 000000000..5e9ac8950 Binary files /dev/null and b/sound/weapons/tuba1_loopnote0.ogg differ diff --git a/sound/weapons/tuba1_loopnote12.ogg b/sound/weapons/tuba1_loopnote12.ogg new file mode 100644 index 000000000..9be699469 Binary files /dev/null and b/sound/weapons/tuba1_loopnote12.ogg differ diff --git a/sound/weapons/tuba1_loopnote18.ogg b/sound/weapons/tuba1_loopnote18.ogg new file mode 100644 index 000000000..66c6c7ca8 Binary files /dev/null and b/sound/weapons/tuba1_loopnote18.ogg differ diff --git a/sound/weapons/tuba1_loopnote24.ogg b/sound/weapons/tuba1_loopnote24.ogg new file mode 100644 index 000000000..07c523f90 Binary files /dev/null and b/sound/weapons/tuba1_loopnote24.ogg differ diff --git a/sound/weapons/tuba1_loopnote6.ogg b/sound/weapons/tuba1_loopnote6.ogg new file mode 100644 index 000000000..0af041701 Binary files /dev/null and b/sound/weapons/tuba1_loopnote6.ogg differ