Raised This Month: $ Target: $400
 0% 

CVAR 'mapcyclefile' always returns 'mapcycle.txt'


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
AdamR
Senior Member
Join Date: Dec 2006
Location: Cardiff, South Wales
Old 01-13-2009 , 11:45   Re: CVAR 'mapcyclefile' always returns 'mapcycle.txt'
Reply With Quote #1

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?
__________________
Thanks,

Adam Reece - Sven Co-op team.
AdamR is offline
Send a message via Skype™ to AdamR
Drak
Veteran Member
Join Date: Jul 2005
Old 01-14-2009 , 00:09   Re: CVAR 'mapcyclefile' always returns 'mapcycle.txt'
Reply With Quote #2

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
Bad_Bud
Senior Member
Join Date: Oct 2006
Location: The internet
Old 01-16-2009 , 00:20   Re: CVAR 'mapcyclefile' always returns 'mapcycle.txt'
Reply With Quote #3

Figure it out yet, or should I install Sven and fry my brain for (computer) science?
__________________
Bad_Bud 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 01:37.


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