[nexuiz-commits] r6997 - trunk/misc/tools

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Fri Jun 12 04:19:20 EDT 2009


Author: div0
Date: 2009-06-12 04:19:20 -0400 (Fri, 12 Jun 2009)
New Revision: 6997

Modified:
   trunk/misc/tools/midi2cfg-ng.conf
   trunk/misc/tools/midi2cfg-ng.pl
Log:
make proper use of barriers now :P


Modified: trunk/misc/tools/midi2cfg-ng.conf
===================================================================
--- trunk/misc/tools/midi2cfg-ng.conf	2009-06-12 08:17:49 UTC (rev 6996)
+++ trunk/misc/tools/midi2cfg-ng.conf	2009-06-12 08:19:20 UTC (rev 6997)
@@ -4,8 +4,8 @@
 		cmd barrier
 		cmd selectweapon 16
 		cmd wait 0.5
-		raw g_balance_tuba_attenuation 0.1
-		raw g_balance_tuba_damage 0
+		cmd console "g_balance_tuba_attenuation 0.1"
+		cmd console "g_balance_tuba_damage 0"
 	note on -18
 		time -0.05
 		buttons left backward crouch
@@ -446,6 +446,7 @@
 bot jetpack
 	init
 		cmd barrier
+		cmd console "g_jetpack_attenuation 0.5"
 	percussion 42
 		time 0
 		buttons hook
@@ -478,7 +479,7 @@
 		cmd barrier
 		cmd selectweapon 8
 		cmd wait 0.5
-		raw g_balance_hagar_primary_lifetime 0.1
+		cmd console "g_balance_hagar_primary_lifetime 0.1"
 	percussion 35
 		time 0
 		buttons attack1
@@ -502,7 +503,7 @@
 		cmd barrier
 		cmd selectweapon 14
 		cmd wait 0.5
-		raw g_balance_seeker_tag_lifetime 0.1
+		cmd console "g_balance_seeker_tag_lifetime 0.1"
 	percussion 36
 		time 0
 		buttons attack1
@@ -522,7 +523,7 @@
 		cmd barrier
 		cmd selectweapon 1
 		cmd wait 0.5
-		raw g_balance_laser_primary_lifetime 0.2
+		cmd console "g_balance_laser_primary_lifetime 0.2"
 	percussion 39
 		time 0
 		buttons attack1

Modified: trunk/misc/tools/midi2cfg-ng.pl
===================================================================
--- trunk/misc/tools/midi2cfg-ng.pl	2009-06-12 08:17:49 UTC (rev 6996)
+++ trunk/misc/tools/midi2cfg-ng.pl	2009-06-12 08:19:20 UTC (rev 6997)
@@ -226,7 +226,7 @@
 	{
 		if($_->[0] eq 'time')
 		{
-			printf "w %d %f\n", $bot->{id}, $time + $_->[1];
+			printf "sv_cmd bot_cmd %d wait_until %f\n", $bot->{id}, $time + $_->[1];
 			$bot->{timer} = $time + $_->[1];
 		}
 		elsif($_->[0] eq 'busy')
@@ -243,14 +243,14 @@
 			}
 			for(keys %buttons_release)
 			{
-				printf "r %d %s\n", $bot->{id}, $_;
+				printf "sv_cmd bot_cmd %d releasekey %s\n", $bot->{id}, $_;
 				delete $bot->{buttons}->{$_};
 			}
 			for(@{$_}[1..@$_-1])
 			{
 				/(.*)(\?)?/ or next;
 				defined $2 and next;
-				printf "p %d %s\n", $bot->{id}, $_;
+				printf "sv_cmd bot_cmd %d presskey %s\n", $bot->{id}, $_;
 				$bot->{buttons}->{$_} = 1;
 			}
 		}
@@ -305,7 +305,7 @@
 	{
 		return 0
 			if not busybot_cmd_bot_test $bot, $time + $notetime, @$cmds; 
-		busybot_cmd_bot_execute $bot, 0, ['wait', $timeoffset];
+		busybot_cmd_bot_execute $bot, 0, ['cmd', 'wait', $timeoffset];
 		busybot_cmd_bot_execute $bot, 0, ['cmd', 'barrier'];
 		busybot_cmd_bot_execute $bot, 0, @{$bot->{init}}
 			if @{$bot->{init}};
@@ -397,11 +397,6 @@
 	return 0;
 }
 
-print 'alias p "sv_cmd bot_cmd $1 presskey $2"' . "\n";
-print 'alias r "sv_cmd bot_cmd $1 releasekey $2"' . "\n";
-print 'alias w "sv_cmd bot_cmd $1 wait_until $2"' . "\n";
-print 'alias m "sv_cmd bot_cmd $1 moveto \"$2 $3 $4\""' . "\n";
-
 for(@preallocate)
 {
 	die "Cannot preallocate any more $_ bots"
@@ -409,7 +404,7 @@
 	my $bot = Storable::dclone $busybots->{$_};
 	$bot->{id} = @busybots_allocated + 1;
 	$bot->{classname} = $_;
-	busybot_cmd_bot_execute $bot, 0, ['wait', $timeoffset];
+	busybot_cmd_bot_execute $bot, 0, ['cmd', 'wait', $timeoffset];
 	busybot_cmd_bot_execute $bot, 0, ['cmd', 'barrier'];
 	busybot_cmd_bot_execute $bot, 0, @{$bot->{init}}
 		if @{$bot->{init}};
@@ -458,14 +453,14 @@
 
 for(@busybots_allocated)
 {
-	busybot_cmd_bot_execute $_, 0, ['wait', $timeoffset3];
+	busybot_cmd_bot_execute $_, 0, ['cmd', 'wait', $timeoffset3];
 	busybot_cmd_bot_execute $_, 0, ['cmd', 'barrier'];
 	if($_->{done})
 	{
-		busybot_cmd_bot_execute $_, @{$_->{done}};
+		busybot_cmd_bot_execute $_, 0, @{$_->{done}};
 	}
 	busybot_cmd_bot_execute $_, 0, ['cmd', 'barrier'];
-	busybot_cmd_bot_execute $_, 0, ['wait', $timeoffset4];
+	busybot_cmd_bot_execute $_, 0, ['cmd', 'wait', $timeoffset4];
 }
 
 print STDERR "Range of notes: $note_min .. $note_max\n";



More information about the nexuiz-commits mailing list