From bfaf31b822f4157fe502ebc9e944380f598c11cc Mon Sep 17 00:00:00 2001 From: RandomityGuy <31925790+RandomityGuy@users.noreply.github.com> Date: Sun, 4 Dec 2022 18:38:59 +0530 Subject: [PATCH] fix noise by magnets, tornadoes and ductfans --- src/shapes/DuctFan.hx | 4 ++-- src/shapes/Magnet.hx | 4 ++-- src/shapes/SmallDuctFan.hx | 4 ++-- src/shapes/Tornado.hx | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/shapes/DuctFan.hx b/src/shapes/DuctFan.hx index 57e29c93..f42f037e 100644 --- a/src/shapes/DuctFan.hx +++ b/src/shapes/DuctFan.hx @@ -39,8 +39,8 @@ class DuctFan extends ForceObject { }); } - public override function update(timeState:src.TimeState) { - super.update(timeState); + public override function reset() { + super.reset(); var seffect = this.soundChannel.getEffect(Spatialization); seffect.position = this.getAbsPos().getPosition(); diff --git a/src/shapes/Magnet.hx b/src/shapes/Magnet.hx index b4569373..3cb79165 100644 --- a/src/shapes/Magnet.hx +++ b/src/shapes/Magnet.hx @@ -40,8 +40,8 @@ class Magnet extends ForceObject { }); } - public override function update(timeState:src.TimeState) { - super.update(timeState); + public override function reset() { + super.reset(); if (this.soundChannel != null) { var seffect = this.soundChannel.getEffect(Spatialization); diff --git a/src/shapes/SmallDuctFan.hx b/src/shapes/SmallDuctFan.hx index adbd8401..0dc41287 100644 --- a/src/shapes/SmallDuctFan.hx +++ b/src/shapes/SmallDuctFan.hx @@ -39,8 +39,8 @@ class SmallDuctFan extends ForceObject { }); } - public override function update(timeState:src.TimeState) { - super.update(timeState); + public override function reset() { + super.reset(); var seffect = this.soundChannel.getEffect(Spatialization); seffect.position = this.getAbsPos().getPosition(); diff --git a/src/shapes/Tornado.hx b/src/shapes/Tornado.hx index f45831fe..b309fd6f 100644 --- a/src/shapes/Tornado.hx +++ b/src/shapes/Tornado.hx @@ -60,8 +60,8 @@ class Tornado extends ForceObject { }); } - public override function update(timeState:src.TimeState) { - super.update(timeState); + public override function reset() { + super.reset(); var seffect = this.soundChannel.getEffect(Spatialization); seffect.position = this.getAbsPos().getPosition();