Raised This Month: $ Target: $400
 0% 

How to emit sound without entity?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 05-24-2010 , 23:02   Re: How to emit sound without entity?
Reply With Quote #1

The counter-strike engine can handle a ridiculous amount of function calls and operations at one time. Don't let people's whining about optimization and cpu intensity affect your opinion on the engine's capabilities.

Servers have thousands of lines of code being executed every frame on things like PreThink and constant function calls. Things like LJ stats and BlockMaker do virtually all of their (virtual) physical calculations and checks on PreThink and PostThink.

Don't worry about optimization and cpu intensity when you're creating something. Optimizations should come after you reach your objective.
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-25-2010 , 01:04   Re: How to emit sound without entity?
Reply With Quote #2

Use EngFunc_EmitAmbientSound with entity = 0

Code:
EngFunc_EmitAmbientSound, // void ) (edict_t *entity, float *pos, const char *samp, float vol, float attenuation, int fFlags, int pitch);
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:22.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode