View unanswered posts | View active topics It is currently Wed Sep 08, 2010 9:54 pm



Reply to topic  [ 4 posts ] 
Workaround: fusion reactor multiple critical sound bug 
Author Message
New
New

Joined: Sun Feb 07, 2010 2:50 pm
Posts: 23
Post Workaround: fusion reactor multiple critical sound bug
Hello everybody, finally i decided to register on this forum, to share a workaround for this annoying bug.
(I think it does not effect everyone, but i am one of these unlucky guys who is affected by this.)

The problem is: "coast.siren_citizen" is a background sound, which will repeat itself until its stopped by "StopSound".
Lets take a look in "..\garrysmod\garrysmod\addons\LSE\lua\entities\generator_energy_fusion\init.lua"

Code:
         if self.time > 3 then
            self:EmitSound( "coast.siren_citizen" )
            self.time = 0


That means every 3 seconds it will start a new coast.siren,
if your System does support the playback for mutiple instances of one background soundfile.
(I bet there is a general workaround which prevents backgroundfile to loop itself or be executed mutiple times)
Anyhow, i decided to take a look into the lua files and decided to "fix" that, at least for me.

so i edited that part to
Code:
         if self.time > 1 then
            self:StopSound( "coast.siren_citizen" )
            self:EmitSound( "coast.siren_citizen" )
            self.time = 0


i tried some diffrent timimgs but i realized that the "cut" between the old and the new sound would been between 5 and 6... and even 11 wouldnt fit, so i decided to use 1, which prevents a hearable cut.

So thats it! It works fine for me. 8-)
Just wanted to share this. :)

edit: i just dicovered the awesome´ness of SVN, and create a patch file :-D
Also i think this is should be moved to "Garry'smod » Lua » Addons » Life Support"
since it was already mentioned in "Report bugs here" ( on page 4 by ***ESTEBAN*** ) :oops:


Attachments:
critical_sound_loop_fix.rar [266 Bytes]
Downloaded 9 times
Sun Feb 07, 2010 5:10 pm
Profile E-mail
New
New

Joined: Sun Feb 07, 2010 2:50 pm
Posts: 23
Post Re: Workaround: fusion reactor multiple critical sound bug
it´s been some time since i logged in.

Somewhere i read that old bugs should be bumped and there is a bug tracker somehow, and SVN-links are about be changed.

but i read that all yesterday and my memory is really fragmented... and i cant effort to defrag it now :lol:

So is that bug still in there? I think it is, but im not sure if i have the correct, up to date, svn links.

And of course, another workaround would be: Change the soundfile to another, non-background soundfile.


Tue May 25, 2010 10:05 pm
Profile E-mail
Site Admin
Site Admin

Joined: Mon Mar 23, 2009 3:20 pm
Posts: 341
Post Re: Workaround: fusion reactor multiple critical sound bug
Sven-2k wrote:
it´s been some time since i logged in.

Somewhere i read that old bugs should be bumped and there is a bug tracker somehow, and SVN-links are about be changed.

but i read that all yesterday and my memory is really fragmented... and i cant effort to defrag it now :lol:

So is that bug still in there? I think it is, but im not sure if i have the correct, up to date, svn links.

And of course, another workaround would be: Change the soundfile to another, non-background soundfile.


I'll check it out during the weekend, to see if the bug is still in there, and otherwise apply your fix for it ;)


Fri May 28, 2010 6:35 am
Profile E-mail
New
New

Joined: Sun Feb 07, 2010 2:50 pm
Posts: 23
Post Re: Workaround: fusion reactor multiple critical sound bug
its still in there in the 3.x

please apply my patch to it, or change to a non Looping soundfile. :oh:


Tue Jun 29, 2010 10:52 pm
Profile E-mail
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.