From 14aa22031f038b65a29e6166bd5c63f767cfd5d4 Mon Sep 17 00:00:00 2001 From: div0 Date: Fri, 13 Feb 2009 18:17:52 +0000 Subject: [PATCH] compensate for more glitches git-svn-id: svn://svn.icculus.org/nexuiz/trunk@5869 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- misc/tools/shader-checksums.pl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/misc/tools/shader-checksums.pl b/misc/tools/shader-checksums.pl index 172bea592..77a4b4211 100755 --- a/misc/tools/shader-checksums.pl +++ b/misc/tools/shader-checksums.pl @@ -38,13 +38,19 @@ nextline: my $brace_index = [grep { $line[$_] eq "}" } 0..@line-1]->[0]; if(defined $brace_index) { - @nextline = splice @line, $brace_index || 1; + unshift @nextline, splice @line, $brace_index || 1; } # allow initial { token if(@line >= 2 && $line[0] eq '{') { - @nextline = splice @line, 1; + unshift @nextline, splice @line, 1; + } + + # in level 0, make the map name a separate token + if(@level == 0 && @line >= 2) + { + unshift @nextline, splice @line, 1; } $shadertext .= "@line\n"; -- 2.39.2