Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Tiberian Technologies / Blackhand Studios » Tiberian Technologies Forum » Brenbot rotation command
Re: Brenbot rotation command [message #489511 is a reply to message #489439] Fri, 03 October 2014 14:17 Go to previous messageGo to previous message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma:
General (5 Stars)
BRenBot reads the rotation from your tt.cfg file like so;

	# If using SSGM 4.0 then read the map rotation from the tt.cfg file
	if ( $ssgm_version >= 4 )
	{
		my $ttConfigFile;
		my $mapRotationIdx = -1;

		open ( ttConfigFile, $config_fdspath."/tt.cfg" );
		while ( <ttConfigFile> )
		{
			# Start of map rotation section?
			if ( /^rotation\:$/ )
			{
				$mapRotationIdx = 0;
			}

			# End of map rotation section?
			elsif ( $mapRotationIdx >= 0 && /^\];$/ )
			{
				$mapRotationIdx = -1;
			}

			elsif ( $mapRotationIdx >= 0 && /^\s*\"(.+)\"\,?$/ )
			{
				chomp(my $mapname=$1);
				my %hash;
				$hash{'mapname'} = $mapname;
				$hash{'id'} = $mapRotationIdx;
				push (@maplist, \%hash);

				# Increment map rotation def index
				$mapRotationIdx++;
			}
		}
		close ( ttConfigFile );
	}


http://steamsignature.com/card/1/76561197975867233.png
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Serial Change
Next Topic: Pressing the chat log button as the game ends causes crash
Goto Forum:
  


Current Time: Fri Nov 29 01:43:19 MST 2024

Total time taken to generate the page: 0.00793 seconds