9 open my $fh, '<', 'effectinfo.txt';
14 next if /^\/\/ used in /;
15 next if /^\/\/ used nowhere in code$/;
17 if(/^effect\s+([^\s\/]+)\s*(?:\/\/.*)?$/i)
21 print STDERR "Handling $1...\n";
24 $1 eq 'TR_BLOOD' ? 'MF_GIB' :
25 $1 eq 'TR_SLIGHTBLOOD' ? 'MF_ZOMGIB' :
26 $1 eq 'TR_WIZSPIKE' ? 'MF_TRACER' :
27 $1 eq 'TR_KNIGHTSPIKE' ? 'MF_TRACER2' :
28 $1 eq 'TR_ROCKET' ? 'MF_ROCKET' :
29 $1 eq 'TR_GRENADE' ? 'MF_GRENADE' :
30 $1 eq 'TR_VORESPIKE' ? 'MF_TRACER3' :
32 local $ENV{effectre} =
35 : "\"$search\"|\\<" . lc($search) . "\\>|\\<" . $search . "\\>";
36 print "$ENV{effectre}\n";
37 my $occurrences = `grep -E "\$effectre" qcsrc/server/*.qc qcsrc/client/*.qc`;
38 $occurrences =~ s/\r/\n/g;
39 $occurrences =~ s/;//g;
41 for(split /\n/, $occurrences)
44 next if /^qcsrc\/server\/gamecommand\.qc:/; # list of quake effects is there
45 next if /^qcsrc\/client\/csqc_builtins\.qc:/; # list of quake effects is there
46 next if /^qcsrc\/client\/csqc_constants\.qc:/; # list of quake effects is there
47 $out .= "// used in $_\n";
52 $out .= "// used nowhere in code\n";
61 open $fh, '>', 'effectinfo.txt';