From 0be8aafa268a5930af1e3689f0de83d78cb6dd3c Mon Sep 17 00:00:00 2001 From: div0 Date: Mon, 30 Jun 2008 19:37:50 +0000 Subject: [PATCH] early start of merge-entities.def.pl. With syntax erorrs. Will finish it later. git-svn-id: svn://svn.icculus.org/nexuiz/trunk@3746 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- data/qcsrc/server/merge-entities-def.pl | 43 +++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 data/qcsrc/server/merge-entities-def.pl diff --git a/data/qcsrc/server/merge-entities-def.pl b/data/qcsrc/server/merge-entities-def.pl new file mode 100644 index 000000000..fc6cb9461 --- /dev/null +++ b/data/qcsrc/server/merge-entities-def.pl @@ -0,0 +1,43 @@ +#!/usr/bin/perl + +use strict; +use warnings; + +my %spawnfuncs; +my %entitiesdef; + +-f "qc.asm" + or (system 'fteqcc -Fwasm' + and die "fteqcc died"); +open my $fh, '<', 'qc.asm' + or die "qc.asm: $!"; +while(<$fh>) +{ + chomp; + /^void \(\) spawnfunc_(.*);$/ + and $spawnfuncs{$1} = 1; +} +close $fh; + +open $fh, '+<', '../../entities.def' + or die "entities.def: $!"; +my $s = do { undef local $/; <$fh>; }; +while($s =~ s/\n\/\*QUAKED (\S+) (.*?)\*\//\n/s) +{ + $entitiesdef{$1} = $2; +} + +use Data::Dumper; +print Dumper \%entitiesdef; + +I KNOW THIS WON'T COMPILE, I WILL FINISH IT LATER +example description +"(0 .5 0) (-8 -8 -8) (8 8 8) +Aiming target for entities like light, misc_portal_camera and trigger_push (jump pads) in particular. +-------- KEYS -------- +targetname : the entity that requires an aiming direction points to this. +notfree : when set to 1, entity will not spawn in "Free for all" and "Tournament" modes. +notteam : when set to 1, entity will not spawn in "Teamplay" and "CTF" modes. +notsingle : when set to 1, entity will not spawn in Single Player mode (bot play mode). +-------- NOTES -------- +To make a jump pad, place this entity at the highest point of the jump and target it with a trigger_push entity." -- 2.39.2