diff --git a/sndinfo.txt b/sndinfo.txt index 41b9ea1..7fdcf02 100644 --- a/sndinfo.txt +++ b/sndinfo.txt @@ -1,2 +1,3 @@ kiri/gretchencounter_click "sounds/kirigretchencounter_click.ogg" kiri/gretchencounter_blip "sounds/kirigretchencounter_blip.ogg" +kiri/gretchencounter_onoff "sounds/kirigretchencounter_onoff.ogg" diff --git a/sounds/kirigretchencounter_onoff.ogg b/sounds/kirigretchencounter_onoff.ogg new file mode 100644 index 0000000..04d7ad4 Binary files /dev/null and b/sounds/kirigretchencounter_onoff.ogg differ diff --git a/source_data/Makefile b/source_data/Makefile index 46356ff..dec6948 100644 --- a/source_data/Makefile +++ b/source_data/Makefile @@ -7,6 +7,7 @@ all : \ ../sprites/bright_kgcmb0.png \ ../sounds/kirigretchencounter_click.ogg \ ../sounds/kirigretchencounter_blip.ogg \ + ../sounds/kirigretchencounter_onoff.ogg \ ../sprites/kgcpa0.png \ ../sprites/kgcpb0.png \ ../sprites/bright_kgcpa0.png \ @@ -85,3 +86,6 @@ all : \ ../sounds/kirigretchencounter_blip.ogg : kirigretchencounter_blip.wav ffmpeg -i $^ "-filter:a" "volume=1.0" $@ + +../sounds/kirigretchencounter_onoff.ogg : on_off_switch.wav + ffmpeg -i $^ "-filter:a" "volume=1.0" $@ diff --git a/source_data/on_off_switch.aup3 b/source_data/on_off_switch.aup3 new file mode 100644 index 0000000..8005d4b Binary files /dev/null and b/source_data/on_off_switch.aup3 differ diff --git a/source_data/on_off_switch.wav b/source_data/on_off_switch.wav new file mode 100644 index 0000000..9d2a8d0 Binary files /dev/null and b/source_data/on_off_switch.wav differ diff --git a/zscript.zs b/zscript.zs index ee91735..42ece36 100644 --- a/zscript.zs +++ b/zscript.zs @@ -86,8 +86,7 @@ class GretchenCounter : HDWeapon KGCM # 1 { invoker.onSwitch = !invoker.onSwitch; - console.printf("onswitch: %d", int(invoker.onSwitch)); - // TODO: Play sound. + A_PlaySound("kiri/gretchencounter_onoff"); updateOverlay(); } @@ -150,8 +149,7 @@ class GretchenCounter : HDWeapon // Scale distance. dist *= distance_scale; - - // console.printf("%s", type_name); + // Apply inverse-square falloff. totalReading += 1.0 / (dist * dist); } @@ -172,8 +170,6 @@ class GretchenCounter : HDWeapon referenceActor = self; } - console.printf("kjsdcsjkdcnsdjkcnsdkjcnsdc, %d", int(onSwitch)); - // ThinkerIterator iter = ThinkerIterator.Create("BFGNecroShard"); // Actor mo; // int shardCount = 0;