[nexuiz-commits] r7059 - trunk/misc/tools
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Thu Jun 18 17:14:42 EDT 2009
Author: div0
Date: 2009-06-18 17:14:42 -0400 (Thu, 18 Jun 2009)
New Revision: 7059
Modified:
trunk/misc/tools/midi2cfg-ng.conf
trunk/misc/tools/midi2cfg-ng.pl
trunk/misc/tools/midichannels.pl
Log:
midi2cfg improvements ;)
Modified: trunk/misc/tools/midi2cfg-ng.conf
===================================================================
--- trunk/misc/tools/midi2cfg-ng.conf 2009-06-18 20:44:03 UTC (rev 7058)
+++ trunk/misc/tools/midi2cfg-ng.conf 2009-06-18 21:14:42 UTC (rev 7059)
@@ -416,6 +416,8 @@
busy 0.2
percussion 33
percussion 27
+ percussion 54
+ percussion 27
bot crylink
channels 10
@@ -435,7 +437,7 @@
percussion 31
percussion 42
time 0
- buttons attack2
+ buttons attack1
time 0.05
buttons
time 0.1
@@ -447,6 +449,7 @@
bot jetpack
init
+ cmd resetaim
cmd barrier
cmd console "g_jetpack_attenuation 0.5"
percussion 42
@@ -461,9 +464,14 @@
percussion 42
percussion 37
percussion 42
+ percussion 51
+ percussion 42
+ percussion 59
+ percussion 42
bot jump
init
+ cmd resetaim
cmd barrier
percussion 42
time -0.5
@@ -577,13 +585,16 @@
super
done
cmd movetotarget @places_end
+ cmd resetaim
+ cmd aim "90 0"
cmd wait 1
barrier
buttons crouch
- cmd wait 2
+ cmd wait 3
buttons
cmd wait 1
barrier
+ cmd console settemp bot_navigation_ignoreplayers 1
cmd movetotarget start
bot instance_tuba_blue
@@ -595,13 +606,16 @@
super
done
cmd movetotarget @places_end
+ cmd resetaim
+ cmd aim "90 0"
cmd wait 1
barrier
buttons crouch
- cmd wait 2
+ cmd wait 3
buttons
cmd wait 1
barrier
+ cmd console settemp bot_navigation_ignoreplayers 1
cmd movetotarget start
bot instance_rocket
@@ -613,13 +627,16 @@
super
done
cmd movetotarget @places_end
+ cmd resetaim
+ cmd aim "90 0"
cmd wait 1
barrier
buttons crouch
- cmd wait 2
+ cmd wait 3
buttons
cmd wait 1
barrier
+ cmd console settemp bot_navigation_ignoreplayers 1
cmd movetotarget start
bot instance_uzi
@@ -631,13 +648,16 @@
super
done
cmd movetotarget @places_end
+ cmd resetaim
+ cmd aim "90 0"
cmd wait 1
barrier
buttons crouch
- cmd wait 2
+ cmd wait 3
buttons
cmd wait 1
barrier
+ cmd console settemp bot_navigation_ignoreplayers 1
cmd movetotarget start
bot instance_crylink
@@ -649,13 +669,16 @@
super
done
cmd movetotarget @places_end
+ cmd resetaim
+ cmd aim "90 0"
cmd wait 1
barrier
buttons crouch
- cmd wait 2
+ cmd wait 3
buttons
cmd wait 1
barrier
+ cmd console settemp bot_navigation_ignoreplayers 1
cmd movetotarget start
bot instance_jetpack
@@ -667,13 +690,16 @@
super
done
cmd movetotarget @places_end
+ cmd resetaim
+ cmd aim "90 0"
cmd wait 1
barrier
buttons crouch
- cmd wait 2
+ cmd wait 3
buttons
cmd wait 1
barrier
+ cmd console settemp bot_navigation_ignoreplayers 1
cmd movetotarget start
bot instance_jump
@@ -685,31 +711,37 @@
super
done
cmd movetotarget @places_end
+ cmd resetaim
+ cmd aim "90 0"
cmd wait 1
barrier
buttons crouch
- cmd wait 2
+ cmd wait 3
buttons
cmd wait 1
barrier
+ cmd console settemp bot_navigation_ignoreplayers 1
cmd movetotarget start
bot instance_hagar
include hagar
- count 4
+ count 6
init
cmd movetotarget @places_percussion
cmd barrier
super
done
cmd movetotarget @places_end
+ cmd resetaim
+ cmd aim "90 0"
cmd wait 1
barrier
buttons crouch
- cmd wait 2
+ cmd wait 3
buttons
cmd wait 1
barrier
+ cmd console settemp bot_navigation_ignoreplayers 1
cmd movetotarget start
bot instance_tag
@@ -721,13 +753,16 @@
super
done
cmd movetotarget @places_end
+ cmd resetaim
+ cmd aim "90 0"
cmd wait 1
barrier
buttons crouch
- cmd wait 2
+ cmd wait 3
buttons
cmd wait 1
barrier
+ cmd console settemp bot_navigation_ignoreplayers 1
cmd movetotarget start
bot instance_laser
@@ -739,13 +774,16 @@
super
done
cmd movetotarget @places_end
+ cmd resetaim
+ cmd aim "90 0"
cmd wait 1
barrier
buttons crouch
- cmd wait 2
+ cmd wait 3
buttons
cmd wait 1
barrier
+ cmd console settemp bot_navigation_ignoreplayers 1
cmd movetotarget start
bot instance_electro
@@ -757,13 +795,16 @@
super
done
cmd movetotarget @places_end
+ cmd resetaim
+ cmd aim "90 0"
cmd wait 1
barrier
buttons crouch
- cmd wait 2
+ cmd wait 3
buttons
cmd wait 1
barrier
+ cmd console settemp bot_navigation_ignoreplayers 1
cmd movetotarget start
bot instance_hook
@@ -775,11 +816,14 @@
super
done
cmd movetotarget @places_end
+ cmd resetaim
+ cmd aim "90 0"
cmd wait 1
barrier
buttons crouch
- cmd wait 2
+ cmd wait 3
buttons
cmd wait 1
barrier
+ cmd console settemp bot_navigation_ignoreplayers 1
cmd movetotarget start
Modified: trunk/misc/tools/midi2cfg-ng.pl
===================================================================
--- trunk/misc/tools/midi2cfg-ng.pl 2009-06-18 20:44:03 UTC (rev 7058)
+++ trunk/misc/tools/midi2cfg-ng.pl 2009-06-18 21:14:42 UTC (rev 7059)
@@ -28,6 +28,7 @@
my $transpose = 0;
my $notetime = undef;
my $lowestnotestart = undef;
+my $noalloc = 0;
sub botconfig_read($)
{
my ($fn) = @_;
@@ -359,6 +360,8 @@
my $canplay = busybot_note_on_bot $bot, $time, $channel, $note, 1;
if($canplay > 0)
{
+ die "noalloc\n"
+ if $noalloc;
--$busybots->{$_}->{count};
$notechannelbots{$channel}{$note} = $bot;
push @busybots_allocated, $bot;
@@ -540,21 +543,32 @@
}
my @preallocate = ();
+$noalloc = 0;
for(;;)
{
$commands = "";
- Preallocate(@preallocate);
- my @l = @midilist;
- while(@l)
+ eval
{
- my $filename = shift @l;
- my $transpose = shift @l;
- ConvertMIDI($filename, $transpose);
- }
- Deallocate();
- my @preallocate_new = map { $_->{classname} } @busybots_allocated;
- last if @preallocate_new == @preallocate;
- @preallocate = @preallocate_new;
+ Preallocate(@preallocate);
+ my @l = @midilist;
+ while(@l)
+ {
+ my $filename = shift @l;
+ my $transpose = shift @l;
+ ConvertMIDI($filename, $transpose);
+ }
+ Deallocate();
+ my @preallocate_new = map { $_->{classname} } @busybots_allocated;
+ if(@preallocate_new == @preallocate)
+ {
+ print "$precommands$commands";
+ exit 0;
+ }
+ @preallocate = @preallocate_new;
+ $noalloc = 1;
+ 1;
+ } or do {
+ die "$@"
+ unless $@ eq "noalloc\n";
+ };
}
-
-print "$precommands$commands";
Modified: trunk/misc/tools/midichannels.pl
===================================================================
--- trunk/misc/tools/midichannels.pl 2009-06-18 20:44:03 UTC (rev 7058)
+++ trunk/misc/tools/midichannels.pl 2009-06-18 21:14:42 UTC (rev 7059)
@@ -46,9 +46,15 @@
{
my %taken = (0 => 1);
my @t = ($tracks->[0]);
+ my $force = 0;
for(@arg)
{
- next if $taken{$_}++;
+ if($_ eq '--force')
+ {
+ $force = 1;
+ next;
+ }
+ next if $taken{$_}++ and not $force;
push @t, $tracks->[$_];
}
$opus->tracks_r(\@t);
More information about the nexuiz-commits
mailing list