From 278cfe9216db92e2b224b0a451ffa6e71d533f79 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 8 Jan 2023 15:45:22 +0100 Subject: [PATCH] - RR: use a meta property for the gambling machine's sound. This is mainly for the hypothetical map that tries to use this thing from within CON. --- .../games/duke/actors/gamblingmachine.zs | 20 +++++++------------ 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/wadsrc/static/zscript/games/duke/actors/gamblingmachine.zs b/wadsrc/static/zscript/games/duke/actors/gamblingmachine.zs index 050c993da..f43e4f2b4 100644 --- a/wadsrc/static/zscript/games/duke/actors/gamblingmachine.zs +++ b/wadsrc/static/zscript/games/duke/actors/gamblingmachine.zs @@ -9,15 +9,13 @@ class RedneckGamblingMachine : DukeActor extra 0; spriteset "GAMBLINGMACHINE2", "GAMBLINGMACHINE3", "GAMBLINGMACHINE4", "GAMBLINGMACHINE5", "GAMBLINGMACHINE6", "GAMBLINGMACHINE7", "GAMBLINGMACHINE8", "GAMBLINGMACHINEBROKE"; spritesetindex 3; - } - - Sound winsound; - - override void Initialize() - { - winsound = "COW3"; - } + RedneckGamblingMachine.winsound "COW3"; + } + + meta Sound winsound; + property winsound: winsound; + override void Tick() { int spriteindex; @@ -123,10 +121,6 @@ class RedneckGamblingMachine2 : RedneckGamblingMachine default { spriteset "GAMBLINGMACHINE2_2", "GAMBLINGMACHINE2_3", "GAMBLINGMACHINE2_4", "GAMBLINGMACHINE2_5", "GAMBLINGMACHINE2_6", "GAMBLINGMACHINE2_7", "GAMBLINGMACHINE2_8", "GAMBLINGMACHINE2_BROKE"; - } - - override void Initialize() - { - winsound = "VX_TPIN2"; + RedneckGamblingMachine.winsound "VX_TPIN2"; } }