3 allidentifiers=`grep "^ _VOICEMSG" qcsrc/server/defs.qh | sed "s/.*(//; s/).*//;"`
5 allsounds=`find sound -name .svn -prune -o \( -name \*.ogg -o -name \*.wav \) -print`
6 for S in $allsounds; do
9 if [ -f "sound/$SND.ogg" ] && [ -f "sound/$SND.wav" ]; then
10 echo "$SND exists twice"
14 # verified by .sounds file check
17 # maps can use them always
20 # maps can use them always
23 # maps can use them always
36 if ! grep -Er '"'$SND'\.(ogg|wav)"' qcsrc/server >/dev/null; then
37 echo "$S ($SND) is unused by the code"
45 allsounds="$LF`find sound/player -mindepth 2 -name .svn -prune -o \( -name \*.ogg -o -name \*.wav \) -print`$LF"
46 remainingsounds=$allsounds
53 case "$remainingsounds" in
55 remainingsounds=${remainingsounds%%$pat*}$LF${remainingsounds#*$pat}
68 psoundfile "$s.ogg" || psoundfile "$s.wav"
73 if psoundtry "$s"; then
76 echo "$S references nonexisting sound $s"
80 for S in models/player/*.sounds sound/player/default.sounds; do
81 if [ "$S" = "sound/player/default.sounds" ] || [ -f "${S#.sounds}" ]; then
84 while read -r TITLE SOUND COUNT; do
89 identifiers_seen="$identifiers_seen ${TITLE#//}"
90 for X in $allidentifiers; do
91 if [ "$X" = "${TITLE#//}" ]; then
99 if psoundtry "$SOUND"; then
104 for i in `seq 1 $COUNT`; do
105 if psoundtry "$SOUND$i"; then
112 echo "$S references existing sound $SOUND but commented out"
114 echo "$S does not have a sound for ${TITLE#//} yet"
119 identifiers_seen="$identifiers_seen $TITLE"
125 for i in `seq 1 $COUNT`; do
136 for X in $identifiers_seen; do
140 for X in $allidentifiers; do
147 for X in $identifiers_seen; do
150 for X in $allidentifiers; do
156 [ -z "$invalid" ] || echo "$S specifies invalid sound identifiers `echo $invalid`"
157 [ -z "$missing" ] || echo "$S lacks sound identifiers `echo $missing`"
160 echo "$S exists for nonexisting player model"
163 for S in $remainingsounds; do
164 echo "$S is not used by any player model"
168 for S in models/player/*.sounds; do echo -n `head -n 1 "$S"`" "; md5sum "$S"; done | sort