Raised This Month: $ Target: $400
 0% 

stock PrecacheParticleSystem()


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Rochellecrab
Junior Member
Join Date: Nov 2010
Old 01-13-2011 , 07:23   stock PrecacheParticleSystem()
Reply With Quote #1

A small and usefull stock:

Code:
stock PrecacheParticleSystem( const String:p_strEffectName[] )
{
	static s_numStringTable = INVALID_STRING_TABLE;

	if ( s_numStringTable == INVALID_STRING_TABLE  )
		s_numStringTable = FindStringTable( "ParticleEffectNames" );

	AddToStringTable( s_numStringTable, p_strEffectName );
}
Call it in the OnMapStart() forward. It will prevent server from lagging when creating new particle systems for the first time.
I tested it in Left 4 Dead 2. I don't know about other mods, but the most possible is that every >= OrangeBox support this.
__________________
Rochellecrab is offline
 



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 22:54.


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