prechacing and emiting sounds
is there a better way of prechacing a sound and emiting it instead of these?
PHP Code:
PHP Code:
|
Re: prechacing and emiting sounds
What you show precache and emit. I don't understand what's your problem. ( Though checking a second time if the file exists would not be necessary )
|
Re: prechacing and emiting sounds
thats want y want to know.
Y want to make the code more eficient. So how should y make this code to be more better? |
Re: prechacing and emiting sounds
Just remove file_exists lines
|
Re: prechacing and emiting sounds
Without or with the both checks doesn't matter, it's not here you will improve your code. Though I would remove the both check, it's not really needed.
|
Re: prechacing and emiting sounds
ok thanks to all of you.
This is not my code.Is from Yaurs version of UWC3 and y am helping him to clean up the code. If y encounter eny more question can y post here? edit: instead of using this PHP Code:
PHP Code:
|
Re: prechacing and emiting sounds
Quote:
A better way IMO, is store the sound(s) in a global, also have whether or not it existed. Code:
enum _:SOUNDS{ |
Re: prechacing and emiting sounds
I had the same idea, but Emp already posted it, so...
|
Re: prechacing and emiting sounds
Well, it's true, you're right. I was just thought in this case sounds are already provided -by default-, that's why these checks are not really worth. I would check only if it's custom sounds provided by the client from a file for example.
|
Re: prechacing and emiting sounds
Quote:
If you use the plugin then having the sounds is kinda the least you should do, haha. |
| All times are GMT -4. The time now is 22:33. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.