Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix health bars being shown where a droid used to be, when always dis…
…playing bars. Fixes ticket:912. Changelog: Fix health bars displayed over empty terrain, when set to always display energy bars.
- Loading branch information
Showing
2 changed files
with
58 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/bash | ||
|
||
# HACK Don't give make errors when switching between trunk and branches. | ||
# Works by finding the .deps/*.Po files which refer to source files that don't exist, and replacing them with a single dependency on the correct source file. | ||
# Now with PD-ksh support. | ||
|
||
if ! rootdir="`git rev-parse --show-cdup 2> /dev/null`" | ||
then | ||
echo "Not in a git repository." | ||
exit 0 | ||
fi | ||
|
||
for path in src/ lib/*/ lib/*/*/ | ||
do | ||
srcpath="${rootdir}${path}" | ||
deppath="${path}.deps/" | ||
if [ -d "${srcpath}" -a -d "${deppath}" ] | ||
then | ||
for ext in c cpp | ||
do | ||
# Iterate over all files that might have broken dependencies. | ||
for fname in `cd ${srcpath} ; echo *.${ext}` | ||
do | ||
fpref="`echo "${fname}" | sed "s/\.${ext}//"`" | ||
srcfile="${srcpath}${fname}" | ||
depfile="${deppath}${fpref}.Po" | ||
|
||
# Check if the dependency file ${depfile} exists and is broken. (The ${srcfile} check prevents looking for files literally called "*.cpp".) | ||
if [ -f "${srcfile}" -a -f "${depfile}" ] && ! grep -q "\b${fname}\b" "${depfile}" 2> /dev/null | ||
then | ||
relpath="`echo "${path}" | sed "s/[^./]*\//..\//g"`" | ||
echo "${fpref}.o: ${relpath}${srcfile}" | tee "${depfile}" | ||
fi | ||
done | ||
done | ||
fi | ||
done | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters