make_mapdef.sh: output entities.def files into the game-dirs now, since
the WorldSpawn editor will now read those instead of looking in its own dir
This commit is contained in:
parent
9fb574d920
commit
decb8ea1fc
1 changed files with 24 additions and 13 deletions
|
@ -2,24 +2,35 @@
|
|||
|
||||
ent_for_mod()
|
||||
{
|
||||
mkdir -p ./bin/platform.game/$1/
|
||||
ENT_OUTFILE="./bin/platform.game/$1/entities.def"
|
||||
rm "$ENT_OUTFILE"
|
||||
# don't bother if we don't have sources
|
||||
if ! [ -f "./$1/src/Makefile" ]; then
|
||||
exit
|
||||
fi
|
||||
|
||||
find ./$1/src/ -type f \( -iname \*.qc \) | while read EDEF_N; do
|
||||
echo "Scanning for definitions inside $EDEF_N"
|
||||
sed -n '/\/*QUAKED/,/*\//p' $EDEF_N >> "$ENT_OUTFILE"
|
||||
done;
|
||||
|
||||
cat ./bin/platform.game/platform/entities.def >> $ENT_OUTFILE
|
||||
ENT_OUTFILE="./$1/entities.def"
|
||||
echo '/*' > "$ENT_OUTFILE"
|
||||
echo 'WorldSpawn entity definition file' >> "$ENT_OUTFILE"
|
||||
echo "$1 specific definitions" >> "$ENT_OUTFILE"
|
||||
echo 'auto-generated by make_mapdef.sh' >> "$ENT_OUTFILE"
|
||||
echo '*/' >> "$ENT_OUTFILE"
|
||||
echo '' >> "$ENT_OUTFILE"
|
||||
|
||||
find ./$1/src/ -type f \( -iname \*.qc \) | while read EDEF_N; do
|
||||
echo "Scanning for definitions inside $EDEF_N"
|
||||
sed -n '/\/*QUAKED/,/*\//p' $EDEF_N >> "$ENT_OUTFILE"
|
||||
done;
|
||||
|
||||
cat ./platform/entities.def >> $ENT_OUTFILE
|
||||
}
|
||||
|
||||
BASE_ENT=./bin/platform.game/platform/entities.def
|
||||
rm "$BASE_ENT"
|
||||
# first dump all the general purpose entities
|
||||
BASE_ENT="./platform/entities.def"
|
||||
echo '/* general platform definitions */' > "$BASE_ENT"
|
||||
|
||||
find ./src/gs-entbase/ -type f \( -iname \*.qc \) | while read EDEF_N; do
|
||||
echo "Scanning for definitions inside $EDEF_N"
|
||||
sed -n '/\/*QUAKED/,/*\//p' $EDEF_N >> "$BASE_ENT"
|
||||
echo "Scanning for definitions inside $EDEF_N"
|
||||
sed -n '/\/*QUAKED/,/*\//p' $EDEF_N >> "$BASE_ENT"
|
||||
done;
|
||||
|
||||
# each game gets its own ents + general purpose ents appended at the end
|
||||
ent_for_mod $1
|
||||
|
|
Loading…
Reference in a new issue