Raised This Month: $ Target: $400
 0% 

Global Shared CVARS - How To ?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
sawce
The null pointer exception error and virtual machine bug
Join Date: Oct 2004
Old 06-06-2007 , 00:23   Re: Global Shared CVARS - How To ?
Reply With Quote #7

Lee is completely correct.

It doesn't matter how many plugins register a cvar, if it has already been registered when another call is made, register_cvar() will act basically like get_cvar_pointer(), and give you the pointer to it for use with pcvars. The value of the already existing cvar will not be changed by subsequent calls to it via register_cvar().

Additionally, no plugins "own" a cvar. It is open for anything within the engine to use freely.

There is no need whatsoever to make a central repository of cvar pointers, or exposing cvar pointers via public variables.
__________________
fyren sucks

Last edited by sawce the snail; 06-06-2007 at 00:29.
sawce 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 10:41.


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