From 286cda2bb5606ed42a0a52d7178213907af74476 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 4 Jan 2020 14:25:07 +0100 Subject: [PATCH] - bumped ZScript version to 4.3 and silenced the remaining deprecation warnings. # Conflicts: # wadsrc/static/zscript.txt --- wadsrc/static/zscript.txt | 2 +- wadsrc/static/zscript/actors/strife/strifestuff.zs | 2 +- wadsrc/static/zscript/base.zs | 2 +- wadsrc/static/zscript/ui/menu/menu.zs | 2 +- wadsrc/static/zscript/ui/statscreen/statscreen.zs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/wadsrc/static/zscript.txt b/wadsrc/static/zscript.txt index 46ffc6608..83d68104a 100644 --- a/wadsrc/static/zscript.txt +++ b/wadsrc/static/zscript.txt @@ -1,4 +1,4 @@ -version "3.8" +version "4.3" #include "zscript/base.zs" #include "zscript/sounddata.zs" #include "zscript/mapdata.zs" diff --git a/wadsrc/static/zscript/actors/strife/strifestuff.zs b/wadsrc/static/zscript/actors/strife/strifestuff.zs index e760bdbc1..1be3fbc53 100644 --- a/wadsrc/static/zscript/actors/strife/strifestuff.zs +++ b/wadsrc/static/zscript/actors/strife/strifestuff.zs @@ -1863,7 +1863,7 @@ class PowerCoupling : Actor Door_Close(225, 16); Floor_LowerToHighestEE(44, 8); players[i].mo.GiveInventoryType ("QuestItem6"); - S_Sound ("svox/voc13", CHAN_VOICE); + S_StartSound ("svox/voc13", CHAN_VOICE); players[i].SetLogNumber (13); players[i].SetSubtitleNumber (13, "svox/voc13"); A_DropItem ("BrokenPowerCoupling", -1, 256); diff --git a/wadsrc/static/zscript/base.zs b/wadsrc/static/zscript/base.zs index 68dd9c68d..7db99c92d 100644 --- a/wadsrc/static/zscript/base.zs +++ b/wadsrc/static/zscript/base.zs @@ -426,7 +426,7 @@ class Object native native static vector3, int G_PickDeathmatchStart(); native static vector3, int G_PickPlayerStart(int pnum, int flags = 0); deprecated("4.3") native static void S_Sound (Sound sound_id, int channel, float volume = 1, float attenuation = ATTN_NORM, float pitch = 0.0); - native static void S_StartSound (Sound sound_id, int flags, int channel, float volume = 1, float attenuation = ATTN_NORM, float pitch = 0.0); + native static void S_StartSound (Sound sound_id, int channel, int flags = 0, float volume = 1, float attenuation = ATTN_NORM, float pitch = 0.0); native static void S_PauseSound (bool notmusic, bool notsfx); native static void S_ResumeSound (bool notsfx); native static bool S_ChangeMusic(String music_name, int order = 0, bool looping = true, bool force = false); diff --git a/wadsrc/static/zscript/ui/menu/menu.zs b/wadsrc/static/zscript/ui/menu/menu.zs index 3adf41d7b..36e554cb1 100644 --- a/wadsrc/static/zscript/ui/menu/menu.zs +++ b/wadsrc/static/zscript/ui/menu/menu.zs @@ -292,7 +292,7 @@ class Menu : Object native ui version("2.4") static void MenuSound(Sound snd) { - S_Sound (snd, CHAN_VOICE | CHAN_UI, snd_menuvolume, ATTN_NONE); + S_StartSound (snd, CHAN_VOICE, CHANF_MAYBE_LOCAL, snd_menuvolume, ATTN_NONE); } static void DrawConText (int color, int x, int y, String str) diff --git a/wadsrc/static/zscript/ui/statscreen/statscreen.zs b/wadsrc/static/zscript/ui/statscreen/statscreen.zs index 93f3764a4..fc9c70fc7 100644 --- a/wadsrc/static/zscript/ui/statscreen/statscreen.zs +++ b/wadsrc/static/zscript/ui/statscreen/statscreen.zs @@ -632,7 +632,7 @@ class StatusScreen abstract play version("2.5") static void PlaySound(Sound snd) { - S_Sound(snd, CHAN_VOICE | CHAN_UI, 1, ATTN_NONE); + S_StartSound(snd, CHAN_VOICE, CHANF_MAYBE_LOCAL, 1, ATTN_NONE); }