Raised This Month: $32 Target: $400
 8% 

CVAR 'mapcyclefile' always returns 'mapcycle.txt'


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Drak
Veteran Member
Join Date: Jul 2005
Old 01-14-2009 , 00:09   Re: CVAR 'mapcyclefile' always returns 'mapcycle.txt'
Reply With Quote #11

Quote:
Originally Posted by AdamR View Post
BTW I thought the way I written it would have been best.

What needs to happen is read the map cycle as normal to determine the next map, but read the previous map to check if it's running now. This is to ensure the map cycle is followed, because if the current map isn't the previous map, it re-schedules the previous map to run again.

That's why I'm reading the map cycle twice.

What's the difference between a CVAR and PCVAR btw?
Code:
new p_Cvar ... p_Cvar = register_cvar("amx_somecvar","1.0");
They sacrifice small bit of memory for speed. get_pcvar_*/set_pcvar_* are direct "pointers" to the CVar memory. Instead of a string look-up. (It's always recommended to use PCvar's over CVars)
__________________
Oh yeah
Drak is offline
Send a message via MSN to Drak
 



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 19:13.


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