Raised This Month: $ Target: $400
 0% 

Precaching models


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 06-04-2010 , 06:48   Re: Precaching models
Reply With Quote #1

Even if fakemeta is already included for other reasons, use precache_model, precache_generic and precache_sound.
Optimization is trivially trivial for this specific example, but it's better to have good habits.
Read this : http://forums.alliedmods.net/showthread.php?t=88792

IMO cvars are not appropriated when precache is involved, because once precache is passed you can't do nothing anymore, so a .cfg or .ini file read during precache should be better.
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 06-04-2010 at 06:51.
ConnorMcLeod is offline
mettyou
Junior Member
Join Date: Apr 2008
Old 06-04-2010 , 14:34   Re: Precaching models
Reply With Quote #2

Quote:
Originally Posted by ConnorMcLeod View Post
Even if fakemeta is already included for other reasons, use precache_model, precache_generic and precache_sound.
Optimization is trivially trivial for this specific example, but it's better to have good habits.
Read this : http://forums.alliedmods.net/showthread.php?t=88792

IMO cvars are not appropriated when precache is involved, because once precache is passed you can't do nothing anymore, so a .cfg or .ini file read during precache should be better.

this is good idea. I will try ( read a file in precache ).
mettyou is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 06-04-2010 , 16:58   Re: Precaching models
Reply With Quote #3

Anyway, the problem on your plugin is that plugin_precache is fired BEFORE plugin_init, so do all stuff in plugin_precache and it's fine.
__________________
- 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:17.


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