]> git.xonotic.org Git - xonotic/xonotic.git/blobdiff - misc/tools/midi2cfg-ng.pl
percussion fixes
[xonotic/xonotic.git] / misc / tools / midi2cfg-ng.pl
index a2e7083f9637446fb039e2a2d4807e7bf689abac..4fe6a0cecb8b47a73a74b4c4f6e48ca8d359bdac 100755 (executable)
@@ -539,16 +539,19 @@ sub botsort($$$$@)
                map
                {
                        my $q = 0;
-                       if(($_->{lastuse} // -666) >= $time - $time_forgetfulness)
+                       if($channel != 10) # percussion just should do round robin
                        {
-                               if($channel == $_->{lastchannel})
+                               if(($_->{lastuse} // -666) >= $time - $time_forgetfulness)
                                {
-                                       $q += $_->{lastchannelsequence};
-                               }
-                               else
-                               {
-                                       # better leave this one alone
-                                       $q -= $_->{lastchannelsequence};
+                                       if($channel == $_->{lastchannel})
+                                       {
+                                               $q += $_->{lastchannelsequence};
+                                       }
+                                       else
+                                       {
+                                               # better leave this one alone
+                                               $q -= $_->{lastchannelsequence};
+                                       }
                                }
                        }
                        [$_, $q, rand]