r3667 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sun Jun 1 09:23:45 EDT 2008


Author: div0
Date: 2008-06-01 09:23:44 -0400 (Sun, 01 Jun 2008)
New Revision: 3667

Modified:
   trunk/data/qcsrc/server/arena.qc
   trunk/data/qcsrc/server/assault.qc
   trunk/data/qcsrc/server/bots.qc
   trunk/data/qcsrc/server/cl_client.qc
   trunk/data/qcsrc/server/cl_impulse.qc
   trunk/data/qcsrc/server/cl_physics.qc
   trunk/data/qcsrc/server/constants.qh
   trunk/data/qcsrc/server/ctf.qc
   trunk/data/qcsrc/server/defs.qh
   trunk/data/qcsrc/server/domination.qc
   trunk/data/qcsrc/server/extensions.qh
   trunk/data/qcsrc/server/g_decors.qc
   trunk/data/qcsrc/server/g_lights.qc
   trunk/data/qcsrc/server/g_subs.qc
   trunk/data/qcsrc/server/g_swamp.qc
   trunk/data/qcsrc/server/g_triggers.qc
   trunk/data/qcsrc/server/g_world.qc
   trunk/data/qcsrc/server/havocbot_roles.qc
   trunk/data/qcsrc/server/miscfunctions.qc
   trunk/data/qcsrc/server/mode_onslaught.qc
   trunk/data/qcsrc/server/runematch.qc
   trunk/data/qcsrc/server/t_halflife.qc
   trunk/data/qcsrc/server/t_items.qc
   trunk/data/qcsrc/server/t_jumppads.qc
   trunk/data/qcsrc/server/t_plats.qc
   trunk/data/qcsrc/server/t_quake.qc
   trunk/data/qcsrc/server/t_quake3.qc
   trunk/data/qcsrc/server/t_swamp.qc
   trunk/data/qcsrc/server/t_teleporters.qc
   trunk/data/qcsrc/server/teamplay.qc
   trunk/data/qcsrc/server/w_rocketlauncher.qc
   trunk/data/qcsrc/server/waypointsprites.qc
Log:
change all spawn functions to use the spawnfunc_ prefix; sync dpextensions


Modified: trunk/data/qcsrc/server/arena.qc
===================================================================
--- trunk/data/qcsrc/server/arena.qc	2008-05-30 08:45:55 UTC (rev 3666)
+++ trunk/data/qcsrc/server/arena.qc	2008-06-01 13:23:44 UTC (rev 3667)
@@ -56,7 +56,7 @@
 		else if(self.classname == "rune")
 		{
 			if(self.owner)
-			if(self.owner.classname != "runematch_spawn_point")
+			if(self.owner.classname != "spawnfunc_runematch_spawn_point")
 				DropAllRunes(self.owner);
 			rune_respawn();
 		}
@@ -65,7 +65,7 @@
 			if(self.health | g_keyhunt)
 				WaypointSprite_Kill(self);
 		}
-		else if(self.classname == "dom_controlpoint")
+		else if(self.classname == "spawnfunc_dom_controlpoint")
 		{
 			dom_controlpoint_setup();
 		}
@@ -87,17 +87,17 @@
 			removedecor(self);
 		}
 		// TODO properly reset Onslaught
-		else if(self.classname == "onslaught_generator")
+		else if(self.classname == "spawnfunc_onslaught_generator")
 		{
 			onslaught_generator_reset();
 		}
-		else if(self.classname == "onslaught_controlpoint")
+		else if(self.classname == "spawnfunc_onslaught_controlpoint")
 		{
 			onslaught_controlpoint_reset();
 		}
 		// TODO properly reset Assault
 		// General teambased game modes
-		else if(self.classname == "info_player_deathmatch")
+		else if(self.classname == "spawnfunc_info_player_deathmatch")
 		{
 			self.team = self.team_saved;
 		}

Modified: trunk/data/qcsrc/server/assault.qc
===================================================================
--- trunk/data/qcsrc/server/assault.qc	2008-05-30 08:45:55 UTC (rev 3666)
+++ trunk/data/qcsrc/server/assault.qc	2008-06-01 13:23:44 UTC (rev 3667)
@@ -1,10 +1,10 @@
 //=============================================================================
 
-/*QUAKED info_player_attacker (1 0 0) (-16 -16 -24) (16 16 45) INITIAL
+/*QUAKED spawnfunc_info_player_attacker (1 0 0) (-16 -16 -24) (16 16 45) INITIAL
 Normal attacker spawning location for Nexuiz Asssault
 -------- KEYS --------
 angle : direction in which player will look when spawning in the game. Does not apply to bots.
-target : this should point to a target_objective to decide when this spawning point is active.
+target : this should point to a spawnfunc_target_objective to decide when this spawning point is active.
 nobots : when set to 1, bots will never use this spawn point to respawn in the game.
 nohumans : when set to 1, human players will never use this spawn point to respawn in the game.
 notfree : when set to 1, entity will not spawn in "Free for all" and "Tournament" modes.
@@ -12,18 +12,18 @@
 notsingle : when set to 1, entity will not spawn in Single Player mode (bot play mode).
 -------- SPAWNFLAGS --------
 INITIAL : makes the spawnpoint the initial place for the player to spawn at the beginning of the game.*/
-void info_player_attacker() {
-	info_player_deathmatch();
+void spawnfunc_info_player_attacker() {
+	spawnfunc_info_player_deathmatch();
 	self.team = COLOR_TEAM1; // red, gets swapped every round
 }
 
 //=============================================================================
 
-/*QUAKED info_player_defender (0 1 0) (-16 -16 -24) (16 16 45) INITIAL
+/*QUAKED spawnfunc_info_player_defender (0 1 0) (-16 -16 -24) (16 16 45) INITIAL
 Normal defender spawning location for Nexuiz Asssault
 -------- KEYS --------
 angle : direction in which player will look when spawning in the game. Does not apply to bots.
-target : this should point to a target_objective to decide when this spawning point is active.
+target : this should point to a spawnfunc_target_objective to decide when this spawning point is active.
 nobots : when set to 1, bots will never use this spawn point to respawn in the game.
 nohumans : when set to 1, human players will never use this spawn point to respawn in the game.
 notfree : when set to 1, entity will not spawn in "Free for all" and "Tournament" modes.
@@ -31,8 +31,8 @@
 notsingle : when set to 1, entity will not spawn in Single Player mode (bot play mode).
 -------- SPAWNFLAGS --------
 INITIAL : makes the spawnpoint the initial place for the player to spawn at the beginning of the game.*/
-void info_player_defender() {
-	info_player_deathmatch();
+void spawnfunc_info_player_defender() {
+	spawnfunc_info_player_deathmatch();
 	self.team = COLOR_TEAM2; // blue, gets swapped every round
 }
 
@@ -61,13 +61,13 @@
 }
 //=============================================================================
 
-/*QUAKED target_objective (0 .5 0) (-8 -8 -8) (8 8 8)
+/*QUAKED spawnfunc_target_objective (0 .5 0) (-8 -8 -8) (8 8 8)
 Objective controller for Nexuiz Assault. When active it has 100 health. If it falls below 0 then
-it'll trigger the next targeted entity (usually the next objective or target_assault_roundend etc.)
+it'll trigger the next targeted entity (usually the next objective or spawnfunc_target_assault_roundend etc.)
 -------- KEYS --------
 targetname : point to e.g. next objective*/
-void target_objective() {
-	self.classname = "target_objective";
+void spawnfunc_target_objective() {
+	self.classname = "spawnfunc_target_objective";
 	self.think = assault_objective_think;
 	self.use = assault_objective_use;
 	assault_objective_reset();
@@ -99,7 +99,7 @@
 	found = 0;
 	objective = find(world, targetname, self.target);
 	while(objective && found == 0) {
-		if(objective.classname == "target_objective") {
+		if(objective.classname == "spawnfunc_target_objective") {
 			found = 1;
 			if(objective.health < ASSAULT_VALUE_INACTIVE) { // targeted objective is active
 				if(self.cnt == 1 && self.max_health >= ASSAULT_VALUE_INACTIVE) { 
@@ -117,7 +117,7 @@
 		local entity ent;
 		ent = find(world, target, self.targetname);
 		if(ent) {
-			if(ent.classname == "func_assault_destructible")
+			if(ent.classname == "spawnfunc_func_assault_destructible")
 				self.spawnflags = 2;
 			else
 				self.spawnflags = 1;
@@ -151,9 +151,9 @@
 //=============================================================================
 
 /*QUAKED target_objective_decrease (0 .5 0) (-8 -8 -8) (8 8 8)
-When triggered decreases health of the targeted target_objective.
+When triggered decreases health of the targeted spawnfunc_target_objective.
 -------- KEYS --------
-targetname : point to a target_objective entity*/
+targetname : point to a spawnfunc_target_objective entity*/
 void target_objective_decrease() {
 
 	self.classname = "target_objective_decrease";
@@ -228,7 +228,7 @@
 }
 
 // destructible walls that can be used to trigger target_objective_decrease
-void func_assault_destructible() {
+void spawnfunc_func_assault_destructible() {
 	if(!self.health)
 		self.health = 100;
 
@@ -236,7 +236,7 @@
 	
 	self.cnt = 0; // not yet activated
 
-	self.classname = "func_assault_destructible";
+	self.classname = "spawnfunc_func_assault_destructible";
 	self.mdl = self.model;
 	setmodel(self, self.mdl);
 
@@ -252,7 +252,7 @@
 	notvisible = 0;
 	ent = find(world, targetname, self.target);
 	while(ent) {
-		if(ent.classname == "target_objective" && ent.health < 0)
+		if(ent.classname == "spawnfunc_target_objective" && ent.health < 0)
 			notvisible = 1;
 		ent = find(ent, targetname, self.target);
 	}
@@ -268,8 +268,8 @@
 	self.nextthink = time + 0.2;
 }
 
-void func_assault_wall() {
-	self.classname = "func_assault_wall";
+void spawnfunc_func_assault_wall() {
+	self.classname = "spawnfunc_func_assault_wall";
 	self.mdl = self.model;
 	setmodel(self, self.mdl);
 	self.solid = SOLID_BSP;
@@ -287,13 +287,13 @@
 	self.winning = 1; // round has been won by attackers
 }
 
-void target_assault_roundend() {
+void spawnfunc_target_assault_roundend() {
 	if(!self.health)
 		self.health = 300; // 5 minutes
 
 	cvar_set("timelimit", ftos(self.health/60));
 	self.winning = 0; // round not yet won by attackers
-	self.classname = "target_assault_roundend";
+	self.classname = "spawnfunc_target_assault_roundend";
 	self.use = target_assault_roundend_use;
 	self.cnt = 0; // first round
 }
@@ -303,9 +303,9 @@
 	SUB_UseTargets();
 }
 
-void target_assault_roundstart() {
+void spawnfunc_target_assault_roundstart() {
 	assault_attacker_team = COLOR_TEAM1;
-	self.classname = "target_assault_roundstart";
+	self.classname = "spawnfunc_target_assault_roundstart";
 	self.use = assault_roundstart_use;
 	self.think = assault_roundstart_use;
 	self.nextthink = time + 0.1;
@@ -340,7 +340,7 @@
 		assault_attacker_team = COLOR_TEAM1;
 	}
 
-	ent = find(world, classname, "info_player_deathmatch");
+	ent = find(world, classname, "spawnfunc_info_player_deathmatch");
 	while (ent)
 	{
 		oldself = self;
@@ -352,11 +352,11 @@
 		}
 		self = oldself;
 
-		ent = find(ent, classname, "info_player_deathmatch");
+		ent = find(ent, classname, "spawnfunc_info_player_deathmatch");
 	} 
 
 	// reset all objectives
-	ent = find(world, classname, "target_objective");
+	ent = find(world, classname, "spawnfunc_target_objective");
 	while (ent)
 	{
 		oldself = self;
@@ -364,11 +364,11 @@
 		assault_objective_reset();
 		self = oldself;
 
-		ent = find(ent, classname, "target_objective");
+		ent = find(ent, classname, "spawnfunc_target_objective");
 	} 
 
 	// reset round end triggers
-	ent = find(world, classname, "target_assault_roundend");
+	ent = find(world, classname, "spawnfunc_target_assault_roundend");
 	while (ent)
 	{
 		oldself = self;
@@ -376,7 +376,7 @@
 		target_assault_roundend_reset();
 		self = oldself;
 
-		ent = find(ent, classname, "target_assault_roundend");
+		ent = find(ent, classname, "spawnfunc_target_assault_roundend");
 	}
 
 	// reset all target_object_decrease
@@ -387,25 +387,25 @@
 		ent = find(ent, classname, "target_objective_decrease");
 	} 
 
-	// reset all func_assault_destructible
-	ent = find(world, classname, "func_assault_destructible");
+	// reset all spawnfunc_func_assault_destructible
+	ent = find(world, classname, "spawnfunc_func_assault_destructible");
 	while (ent)
 	{
 		oldself = self;
 		self = ent;
 		assault_destructible_reset();
 		self = oldself;
-		ent = find(ent, classname, "func_assault_destructible");
+		ent = find(ent, classname, "spawnfunc_func_assault_destructible");
 	}
 
-	ent = find(world, classname, "target_assault_roundstart");
+	ent = find(world, classname, "spawnfunc_target_assault_roundstart");
 	while (ent)
 	{
 		oldself = self;
 		self = ent;
 		self.use();
 		self = oldself;
-		ent = find(ent, classname, "target_assault_roundstart");
+		ent = find(ent, classname, "spawnfunc_target_assault_roundstart");
 	}
 
 	// actually restart round... how to do that?

Modified: trunk/data/qcsrc/server/bots.qc
===================================================================
--- trunk/data/qcsrc/server/bots.qc	2008-05-30 08:45:55 UTC (rev 3666)
+++ trunk/data/qcsrc/server/bots.qc	2008-06-01 13:23:44 UTC (rev 3667)
@@ -332,7 +332,7 @@
 .float bot_offsetskill;
 
 
-// waypoint navigation system
+// spawnfunc_waypoint navigation system
 
 // itemscore = (howmuchmoreIwant / howmuchIcanwant) / itemdistance
 // waypointscore = 0.7 / waypointdistance
@@ -371,7 +371,7 @@
 
 
 /////////////////////////////////////////////////////////////////////////////
-// waypoint management
+// spawnfunc_waypoint management
 /////////////////////////////////////////////////////////////////////////////
 
 // waypoints with this flag are not saved, they are automatically generated
@@ -381,7 +381,7 @@
 float WAYPOINTFLAG_TELEPORT = 2097152;
 float WAYPOINTFLAG_NORELINK = 1048576;
 
-// add a new link to the waypoint, replacing the furthest link it already has
+// add a new link to the spawnfunc_waypoint, replacing the furthest link it already has
 void(entity from, entity to) waypoint_addlink =
 {
 	local float c;
@@ -458,8 +458,8 @@
 	from.wp00 = to;from.wp00mincost = c;return;
 };
 
-// relink this waypoint
-// (precompile a list of all reachable waypoints from this waypoint)
+// relink this spawnfunc_waypoint
+// (precompile a list of all reachable waypoints from this spawnfunc_waypoint)
 // (SLOW!)
 void() waypoint_think =
 {
@@ -468,7 +468,7 @@
 	//dprint("waypoint_think wpisbox = ", ftos(self.wpisbox), "\n");
 	sm1 = self.origin + self.mins;
 	sm2 = self.origin + self.maxs;
-	e = find(world, classname, "waypoint");
+	e = find(world, classname, "spawnfunc_waypoint");
 	stepheightvec = cvar("sv_stepheight") * '0 0 1';
 	while (e)
 	{
@@ -522,7 +522,7 @@
 					waypoint_addlink(e, self);
 			}
 		}
-		e = find(e, classname, "waypoint");
+		e = find(e, classname, "spawnfunc_waypoint");
 	}
 	navigation_testtracewalk = 0;
 };
@@ -538,7 +538,7 @@
 	wp.wp24 = wp.wp25 = wp.wp26 = wp.wp27 = wp.wp28 = wp.wp29 = wp.wp30 = wp.wp31 = world;wp.wp24mincost = wp.wp25mincost = wp.wp26mincost = wp.wp27mincost = wp.wp28mincost = wp.wp29mincost = wp.wp30mincost = wp.wp31mincost = f;
 };
 
-// tell a waypoint to relink
+// tell a spawnfunc_waypoint to relink
 void(entity wp) waypoint_schedulerelink =
 {
 	if (wp == world)
@@ -571,23 +571,23 @@
 	wp.effects = EF_LOWPRECISION;
 }
 
-// create a new waypoint and automatically link it to other waypoints, and link
+// create a new spawnfunc_waypoint and automatically link it to other waypoints, and link
 // them back to it as well
-// (suitable for waypoint editor)
+// (suitable for spawnfunc_waypoint editor)
 entity(vector m1, vector m2, float f) waypoint_spawn =
 {
 	local entity w;
 	local vector org;
-	w = find(world, classname, "waypoint");
+	w = find(world, classname, "spawnfunc_waypoint");
 	while (w)
 	{
-		// if a matching waypoint already exists, don't add a duplicate
+		// if a matching spawnfunc_waypoint already exists, don't add a duplicate
 		if (boxesoverlap(m1, m2, w.absmin, w.absmax))
 			return w;
-		w = find(w, classname, "waypoint");
+		w = find(w, classname, "spawnfunc_waypoint");
 	}
 	w = spawn();
-	w.classname = "waypoint";
+	w.classname = "spawnfunc_waypoint";
 	w.wpflags = f;
 	setorigin(w, (m1 + m2) * 0.5);
 	setsize(w, m1 - w.origin, m2 - w.origin);
@@ -626,7 +626,7 @@
 							if(trace_startsolid)
 							{
 								// this WP is in solid, refuse it
-								dprint("Killed a waypoint that was stuck in solid at ", vtos(org), "\n");
+								dprint("Killed a spawnfunc_waypoint that was stuck in solid at ", vtos(org), "\n");
 								remove(w);
 								return world;
 							}
@@ -640,7 +640,7 @@
 		tracebox(w.origin, PL_MIN, PL_MAX, w.origin - '0 0 128', MOVE_WORLDONLY, w);
 		if(trace_startsolid)
 		{
-			dprint("Killed a waypoint that was stuck in solid ", vtos(w.origin), "\n");
+			dprint("Killed a spawnfunc_waypoint that was stuck in solid ", vtos(w.origin), "\n");
 			remove(w);
 			return world;
 		}
@@ -648,12 +648,12 @@
 		{
 			if(trace_fraction == 1)
 			{
-				dprint("Killed a waypoint that was stuck in air at ", vtos(w.origin), "\n");
+				dprint("Killed a spawnfunc_waypoint that was stuck in air at ", vtos(w.origin), "\n");
 				remove(w);
 				return world;
 			}
 			trace_endpos_z += 0.1; // don't trust the trace fully
-//			dprint("Moved waypoint at ", vtos(w.origin), " by ", ftos(vlen(w.origin - trace_endpos)));
+//			dprint("Moved spawnfunc_waypoint at ", vtos(w.origin), " by ", ftos(vlen(w.origin - trace_endpos)));
 //			dprint(" direction: ", vtos((trace_endpos - w.origin)), "\n");
 			setorigin(w, trace_endpos);
 		}
@@ -664,8 +664,8 @@
 	return w;
 };
 
-// waypoint map entity
-void() waypoint =
+// spawnfunc_waypoint map entity
+void() spawnfunc_waypoint =
 {
 	setorigin(self, self.origin);
 	// schedule a relink after other waypoints have had a chance to spawn
@@ -673,7 +673,7 @@
 	//waypoint_schedulerelink(self);
 };
 
-// remove a waypoint, and schedule all neighbors to relink
+// remove a spawnfunc_waypoint, and schedule all neighbors to relink
 void(entity e) waypoint_remove =
 {
 	// tell all linked waypoints that they need to relink
@@ -709,7 +709,7 @@
 	waypoint_schedulerelink(e.wp29);
 	waypoint_schedulerelink(e.wp30);
 	waypoint_schedulerelink(e.wp31);
-	// and now remove the waypoint
+	// and now remove the spawnfunc_waypoint
 	remove(e);
 };
 
@@ -717,7 +717,7 @@
 void() waypoint_removeall =
 {
 	local entity head, next;
-	head = findchain(classname, "waypoint");
+	head = findchain(classname, "spawnfunc_waypoint");
 	while (head)
 	{
 		next = head.chain;
@@ -731,7 +731,7 @@
 void() waypoint_schedulerelinkall =
 {
 	local entity head;
-	head = findchain(classname, "waypoint");
+	head = findchain(classname, "spawnfunc_waypoint");
 	while (head)
 	{
 		waypoint_schedulerelink(head);
@@ -752,7 +752,7 @@
 	if (file >= 0)
 	{
 		c = 0;
-		w = findchain(classname, "waypoint");
+		w = findchain(classname, "spawnfunc_waypoint");
 		while (w)
 		{
 			if (!(w.wpflags & WAYPOINTFLAG_GENERATED))
@@ -776,7 +776,7 @@
 	}
 	else
 	{
-		bprint("waypoint save to ");
+		bprint("spawnfunc_waypoint save to ");
 		bprint(filename);
 		bprint(" failed\n");
 	}
@@ -826,7 +826,7 @@
 	}
 	else
 	{
-		dprint("waypoint load from ");
+		dprint("spawnfunc_waypoint load from ");
 		dprint(filename);
 		dprint(" failed\n");
 	}
@@ -844,8 +844,8 @@
 	org = e.origin + (e.mins + e.maxs) * 0.5;
 	org_z = e.origin_z + e.mins_z - PL_MIN_z + 1;
 	e.nearestwaypointtimeout = time + 1000000000;
-	// don't spawn an item waypoint if it already exists
-	w = findchain(classname, "waypoint");
+	// don't spawn an item spawnfunc_waypoint if it already exists
+	w = findchain(classname, "spawnfunc_waypoint");
 	while (w)
 	{
 		if (w.wpisbox)
@@ -878,7 +878,7 @@
 	// one way link to the destination
 	w.wp00 = dw;
 	w.wp00mincost = timetaken; // this is just for jump pads
-	// the teleporter's nearest waypoint is this one
+	// the teleporter's nearest spawnfunc_waypoint is this one
 	// (teleporters are not goals, so this is probably useless)
 	e.nearestwaypoint = w;
 	e.nearestwaypointtimeout = time + 1000000000;
@@ -969,7 +969,7 @@
 
 // remove first goal from stack
 // (in other words: remove a prerequisite for reaching the later goals)
-// (used when a waypoint is reached)
+// (used when a spawnfunc_waypoint is reached)
 void() navigation_poproute =
 {
 	self.goalcurrent = self.goalstack01;
@@ -1006,7 +1006,7 @@
 	self.goalstack31 = world;
 };
 
-// find the waypoint near a dynamic goal such as a dropped weapon
+// find the spawnfunc_waypoint near a dynamic goal such as a dropped weapon
 entity(entity player, float walkfromwp) navigation_findnearestwaypoint =
 {
 	local entity waylist, w, best;
@@ -1014,12 +1014,12 @@
 	local vector v, org, pm1, pm2;
 	pm1 = player.origin + PL_MIN;
 	pm2 = player.origin + PL_MAX;
-	waylist = findchain(classname, "waypoint");
+	waylist = findchain(classname, "spawnfunc_waypoint");
 	// do two scans, because box test is cheaper
 	w = waylist;
 	while (w)
 	{
-		// if object is touching waypoint
+		// if object is touching spawnfunc_waypoint
 		if (boxesoverlap(pm1, pm2, w.absmin, w.absmax))
 			return w;
 		w = w.chain;
@@ -1037,7 +1037,7 @@
 	w = waylist;
 	while (w)
 	{
-		// if object can walk from waypoint
+		// if object can walk from spawnfunc_waypoint
 		if (w.wpisbox)
 		{
 			local vector wm1, wm2;
@@ -1123,7 +1123,7 @@
 	return c;
 }
 
-// updates a path link if a waypoint link is better than the current one
+// updates a path link if a spawnfunc_waypoint link is better than the current one
 void(entity w, entity wp, float cost2, vector p) navigation_markroutes_checkwaypoint =
 {
 	local vector m1;
@@ -1149,13 +1149,13 @@
 	}
 };
 
-// queries the entire waypoint network for pathes leading away from the bot
+// queries the entire spawnfunc_waypoint network for pathes leading away from the bot
 void() navigation_markroutes =
 {
 	local entity w, wp, waylist;
 	local float searching, cost, cost2;
 	local vector p;
-	w = waylist = findchain(classname, "waypoint");
+	w = waylist = findchain(classname, "spawnfunc_waypoint");
 	while (w)
 	{
 		w.wpconsidered = FALSE;
@@ -1232,7 +1232,7 @@
 	//te_wizspike(e.origin);
 	//bprint(etos(e));
 	//bprint("\n");
-	// update the cached waypoint link on a dynamic item entity
+	// update the cached spawnfunc_waypoint link on a dynamic item entity
 	if (time > e.nearestwaypointtimeout)
 	{
 		e.nearestwaypoint = navigation_findnearestwaypoint(e, TRUE);
@@ -1291,7 +1291,7 @@
 		//if (trace_fraction == 1)
 		//if (tracewalk(self, self.origin, PL_MIN, PL_MAX, e.origin, MOVE_NORMAL))
 		//	break;
-		// add the waypoint to the path
+		// add the spawnfunc_waypoint to the path
 		navigation_pushroute(e);
 		e = e.enemy;
 	}
@@ -1310,7 +1310,7 @@
 		navigation_poproute();
 }
 
-// begin a goal selection session (queries waypoint network)
+// begin a goal selection session (queries spawnfunc_waypoint network)
 void() navigation_goalrating_start =
 {
 	navigation_bestrating = -1;
@@ -2069,7 +2069,7 @@
 	local float c, d, danger;
 	c = 0;
 	bot_dodgelist = findchainfloat(bot_dodge, TRUE);
-	botframe_dangerwaypoint = find(botframe_dangerwaypoint, classname, "waypoint");
+	botframe_dangerwaypoint = find(botframe_dangerwaypoint, classname, "spawnfunc_waypoint");
 	while (botframe_dangerwaypoint != world)
 	{
 		danger = 0;
@@ -2095,7 +2095,7 @@
 		c = c + 1;
 		if (c >= maxupdate)
 			break;
-		botframe_dangerwaypoint = find(botframe_dangerwaypoint, classname, "waypoint");
+		botframe_dangerwaypoint = find(botframe_dangerwaypoint, classname, "spawnfunc_waypoint");
 	}
 };
 
@@ -2253,7 +2253,7 @@
 	if (bot_list)
 	{
 		// cycle the goal token from one bot to the next each frame
-		// (this prevents them from all doing waypoint searches on the same
+		// (this prevents them from all doing spawnfunc_waypoint searches on the same
 		//  frame, which causes choppy framerates)
 		if (bot_strategytoken_taken)
 		{

Modified: trunk/data/qcsrc/server/cl_client.qc
===================================================================
--- trunk/data/qcsrc/server/cl_client.qc	2008-05-30 08:45:55 UTC (rev 3666)
+++ trunk/data/qcsrc/server/cl_client.qc	2008-06-01 13:23:44 UTC (rev 3667)
@@ -1,18 +1,18 @@
 .float wantswelcomemessage;
 
-void info_player_survivor (void)
+void spawnfunc_info_player_survivor (void)
 {
-	info_player_deathmatch();
+	spawnfunc_info_player_deathmatch();
 }
 
-void info_player_start (void)
+void spawnfunc_info_player_start (void)
 {
-	info_player_deathmatch();
+	spawnfunc_info_player_deathmatch();
 }
 
-void info_player_deathmatch (void)
+void spawnfunc_info_player_deathmatch (void)
 {
-	self.classname = "info_player_deathmatch";
+	self.classname = "spawnfunc_info_player_deathmatch";
 	relocate_spawnpoint();
 }
 
@@ -50,7 +50,7 @@
 			local entity ent;
 			ent = find(world, targetname, spot.target);
 			while(ent) {
-				if(ent.classname == "target_objective")
+				if(ent.classname == "spawnfunc_target_objective")
 					if(ent.health < 0 || ent.health >= ASSAULT_VALUE_INACTIVE)
 						spotactive = 0;
 				ent = find(ent, targetname, spot.target);
@@ -163,7 +163,7 @@
 	// get the list of players
 	playerlist = findchain(classname, "player");
 	// get the entire list of spots
-	firstspot = findchain(classname, "info_player_deathmatch");
+	firstspot = findchain(classname, "spawnfunc_info_player_deathmatch");
 	// filter out the bad ones
 	// (note this returns the original list if none survived)
 	firstspot_new = Spawn_FilterOutBadSpots(firstspot, playerlist, 100, teamcheck);
@@ -911,7 +911,7 @@
 
 	FixClientCvars(self);
 
-	// waypoint sprites
+	// spawnfunc_waypoint sprites
 	WaypointSprite_InitClient(self);
 
 	// Wazat's grappling hook

Modified: trunk/data/qcsrc/server/cl_impulse.qc
===================================================================
--- trunk/data/qcsrc/server/cl_impulse.qc	2008-05-30 08:45:55 UTC (rev 3666)
+++ trunk/data/qcsrc/server/cl_impulse.qc	2008-06-01 13:23:44 UTC (rev 3667)
@@ -96,24 +96,24 @@
 	{
 		if(imp == 30)
 		{
-			WaypointSprite_DeployPersonal("waypoint", self.origin);
+			WaypointSprite_DeployPersonal("spawnfunc_waypoint", self.origin);
 			self.personal_v_angle = self.v_angle;
 			self.personal_velocity = self.velocity;
-			sprint(self, "personal waypoint spawned at location\n");
+			sprint(self, "personal spawnfunc_waypoint spawned at location\n");
 		}
 		else if(imp == 31)
 		{
-			WaypointSprite_DeployPersonal("waypoint", self.cursor_trace_endpos);
+			WaypointSprite_DeployPersonal("spawnfunc_waypoint", self.cursor_trace_endpos);
 			self.personal_v_angle = self.v_angle;
 			self.personal_velocity = '0 0 0';
-			sprint(self, "personal waypoint spawned at crosshair\n");
+			sprint(self, "personal spawnfunc_waypoint spawned at crosshair\n");
 		}
 		else if(imp == 32 && vlen(self.death_origin))
 		{
-			WaypointSprite_DeployPersonal("waypoint", self.death_origin);
+			WaypointSprite_DeployPersonal("spawnfunc_waypoint", self.death_origin);
 			self.personal_v_angle = self.v_angle;
 			self.personal_velocity = '0 0 0';
-			sprint(self, "personal waypoint spawned at death location\n");
+			sprint(self, "personal spawnfunc_waypoint spawned at death location\n");
 		}
 		else if(imp == 33 && self.deadflag == DEAD_NO && teams_matter)
 		{
@@ -153,7 +153,7 @@
 		else if(imp == 47)
 		{
 			WaypointSprite_ClearPersonal();
-			sprint(self, "personal waypoint cleared\n");
+			sprint(self, "personal spawnfunc_waypoint cleared\n");
 		}
 		else if(imp == 48)
 		{
@@ -224,7 +224,7 @@
 						self.pauseregen_finished = time + cvar("g_balance_pause_health_regen_spawn");
 					}
 					else
-						sprint(self, "No waypoint set, cheater (use g_waypointsprite_personal to set one)\n");
+						sprint(self, "No spawnfunc_waypoint set, cheater (use g_waypointsprite_personal to set one)\n");
 				}
 				else if(imp == 99)
 				{

Modified: trunk/data/qcsrc/server/cl_physics.qc
===================================================================
--- trunk/data/qcsrc/server/cl_physics.qc	2008-05-30 08:45:55 UTC (rev 3666)
+++ trunk/data/qcsrc/server/cl_physics.qc	2008-06-01 13:23:44 UTC (rev 3667)
@@ -285,7 +285,7 @@
 	}
 	else if (time < self.ladder_time)
 	{
-		// on a func_ladder or swimming in func_water
+		// on a spawnfunc_func_ladder or swimming in spawnfunc_func_water
 		self.flags = self.flags - (self.flags & FL_ONGROUND);
 
 		self.velocity = self.velocity * (1 - frametime * sv_friction);
@@ -296,7 +296,7 @@
 			self.velocity_z = self.velocity_z + self.gravity * sv_gravity * frametime;
 		else
 			self.velocity_z = self.velocity_z + sv_gravity * frametime;
-		if (self.ladder_entity.classname == "func_water")
+		if (self.ladder_entity.classname == "spawnfunc_func_water")
 		{
 			f = vlen(wishvel);
 			if (f > self.ladder_entity.speed)

Modified: trunk/data/qcsrc/server/constants.qh
===================================================================
--- trunk/data/qcsrc/server/constants.qh	2008-05-30 08:45:55 UTC (rev 3666)
+++ trunk/data/qcsrc/server/constants.qh	2008-06-01 13:23:44 UTC (rev 3667)
@@ -201,7 +201,7 @@
 //float	GAME_FULLBRIGHT_PLAYERS			= 64; /// makes the players model fullbright
 //float	GAME_TEAMS				= 128; /// Teams, red/green/yellow/blue
 
-float	game;	// set to "gamecfg" on worldspawn
+float	game;	// set to "gamecfg" on spawnfunc_worldspawn
 
 
 //float	POWERUP_STRENGTH_DAMAGE			= 2; // damage multiplier for strength powerup

Modified: trunk/data/qcsrc/server/ctf.qc
===================================================================
--- trunk/data/qcsrc/server/ctf.qc	2008-05-30 08:45:55 UTC (rev 3666)
+++ trunk/data/qcsrc/server/ctf.qc	2008-06-01 13:23:44 UTC (rev 3667)
@@ -370,7 +370,7 @@
 	}
 };
 
-/*QUAKED info_player_team1 (1 0 0) (-16 -16 -24) (16 16 24)
+/*QUAKED spawnfunc_info_player_team1 (1 0 0) (-16 -16 -24) (16 16 24)
 CTF Starting point for a player
 in team one (Red).
 
@@ -378,14 +378,14 @@
 "angle"
  viewing angle when spawning
 */
-void() info_player_team1 =
+void() spawnfunc_info_player_team1 =
 {
 	self.team = COLOR_TEAM1; // red
-	info_player_deathmatch();
+	spawnfunc_info_player_deathmatch();
 };
-//self.team = 4;self.classname = "info_player_start";info_player_start();};
+//self.team = 4;self.classname = "spawnfunc_info_player_start";spawnfunc_info_player_start();};
 
-/*QUAKED info_player_team2 (1 0 0) (-16 -16 -24) (16 16 24)
+/*QUAKED spawnfunc_info_player_team2 (1 0 0) (-16 -16 -24) (16 16 24)
 CTF Starting point for a player in
 team two (Blue).
 
@@ -393,14 +393,14 @@
 "angle"
  viewing angle when spawning
 */
-void() info_player_team2 =
+void() spawnfunc_info_player_team2 =
 {
 	self.team = COLOR_TEAM2; // blue
-	info_player_deathmatch();
+	spawnfunc_info_player_deathmatch();
 };
-//self.team = 13;self.classname = "info_player_start";info_player_start();};
+//self.team = 13;self.classname = "spawnfunc_info_player_start";spawnfunc_info_player_start();};
 
-/*QUAKED info_player_team3 (1 0 0) (-16 -16 -24) (16 16 24)
+/*QUAKED spawnfunc_info_player_team3 (1 0 0) (-16 -16 -24) (16 16 24)
 CTF Starting point for a player in
 team three (Magenta).
 
@@ -408,14 +408,14 @@
 "angle"
  viewing angle when spawning
 */
-void() info_player_team3 =
+void() spawnfunc_info_player_team3 =
 {
 	self.team = COLOR_TEAM3; // purple
-	info_player_deathmatch();
+	spawnfunc_info_player_deathmatch();
 };
 
 
-/*QUAKED info_player_team4 (1 0 0) (-16 -16 -24) (16 16 24)
+/*QUAKED spawnfunc_info_player_team4 (1 0 0) (-16 -16 -24) (16 16 24)
 CTF Starting point for a player in
 team four (Yellow).
 
@@ -423,16 +423,16 @@
 "angle"
  viewing angle when spawning
 */
-void() info_player_team4 =
+void() spawnfunc_info_player_team4 =
 {
 	self.team = COLOR_TEAM4; // yellow
-	info_player_deathmatch();
+	spawnfunc_info_player_deathmatch();
 };
 
 
 
 
-/*QUAKED item_flag_team1 (0 0.5 0.8) (-48 -48 -37) (48 48 37)
+/*QUAKED spawnfunc_item_flag_team1 (0 0.5 0.8) (-48 -48 -37) (48 48 37)
 CTF flag for team one (Red).
 Multiple are allowed.
 
@@ -457,7 +457,7 @@
  (default ctf/respawn.wav)
 */
 
-void() item_flag_team1 =
+void() spawnfunc_item_flag_team1 =
 {
 	if (!g_ctf)
 	{
@@ -515,7 +515,7 @@
 	WaypointSprite_SpawnFixed("redbase", self.origin + '0 0 37', self, sprite);
 };
 
-/*QUAKED item_flag_team2 (0 0.5 0.8) (-48 -48 -24) (48 48 64)
+/*QUAKED spawnfunc_item_flag_team2 (0 0.5 0.8) (-48 -48 -24) (48 48 64)
 CTF flag for team two (Blue).
 Multiple are allowed.
 
@@ -540,7 +540,7 @@
  (default ctf/respawn.wav)
 */
 
-void() item_flag_team2 =
+void() spawnfunc_item_flag_team2 =
 {
 	if (!g_ctf)
 	{
@@ -598,11 +598,11 @@
 };
 
 
-/*QUAKED ctf_team (0 .5 .8) (-16 -16 -24) (16 16 32)
+/*QUAKED spawnfunc_ctf_team (0 .5 .8) (-16 -16 -24) (16 16 32)
 Team declaration for CTF gameplay, this allows you to decide what team
 names and control point models are used in your map.
 
-Note: If you use ctf_team entities you must define at least 2!  However, unlike
+Note: If you use spawnfunc_ctf_team entities you must define at least 2!  However, unlike
 domination, you don't need to make a blank one too.
 
 Keys:
@@ -613,14 +613,14 @@
 
 */
 
-void() ctf_team =
+void() spawnfunc_ctf_team =
 {
 	if (!g_ctf)
 	{
 		remove(self);
 		return;
 	}
-	self.classname = "ctf_team";
+	self.classname = "spawnfunc_ctf_team";
 	self.team = self.cnt + 1;
 };
 
@@ -630,11 +630,11 @@
 	local entity oldself;
 	oldself = self;
 	self = spawn();
-	self.classname = "ctf_team";
+	self.classname = "spawnfunc_ctf_team";
 	self.netname = teamname;
 	self.cnt = teamcolor;
 
-	ctf_team();
+	spawnfunc_ctf_team();
 
 	self = oldself;
 };
@@ -655,7 +655,7 @@
 	self.think = SUB_Remove;
 	self.nextthink = time;
 	// if no teams are found, spawn defaults
-	if (find(world, classname, "ctf_team") == world)
+	if (find(world, classname, "spawnfunc_ctf_team") == world)
 		ctf_spawnteams();
 };
 

Modified: trunk/data/qcsrc/server/defs.qh
===================================================================
--- trunk/data/qcsrc/server/defs.qh	2008-05-30 08:45:55 UTC (rev 3666)
+++ trunk/data/qcsrc/server/defs.qh	2008-06-01 13:23:44 UTC (rev 3667)
@@ -1,4 +1,5 @@
 #define MAPINFO
+float require_spawnfunc_prefix; // if this float exists, only functions with spawnfunc_ name prefix qualify as spawn functions
 
 // Globals
 

Modified: trunk/data/qcsrc/server/domination.qc
===================================================================
--- trunk/data/qcsrc/server/domination.qc	2008-05-30 08:45:55 UTC (rev 3666)
+++ trunk/data/qcsrc/server/domination.qc	2008-06-01 13:23:44 UTC (rev 3667)
@@ -7,12 +7,12 @@
 1. Add this line to progs.src above world.qc:
 domination.qc
 2. Comment out all lines in ClientObituary in client.qc that begin with targ.frags  or attacker.frags.
-3. Add this above worldspawn in world.qc:
+3. Add this above spawnfunc_worldspawn in world.qc:
 void() dom_init;
-4. Add this line to the end of worldspawn in world.qc:
+4. Add this line to the end of spawnfunc_worldspawn in world.qc:
 dom_init();
 
-Note: The only teams who can use dom control points are identified by dom_team entities (if none exist these default to red and blue and use only quake models/sounds).
+Note: The only teams who can use dom control points are identified by spawnfunc_dom_team entities (if none exist these default to red and blue and use only quake models/sounds).
 */
 
 void() dom_controlpoint_setup;
@@ -166,9 +166,9 @@
 		return;
 
 	// only valid teams can claim it
-	head = find(world, classname, "dom_team");
+	head = find(world, classname, "spawnfunc_dom_team");
 	while (head && head.team != other.team)
-		head = find(head, classname, "dom_team");
+		head = find(head, classname, "spawnfunc_dom_team");
 	if (!head || head.netname == "" || head == self.goalentity)
 		return;
 
@@ -186,9 +186,9 @@
 	//self.think = dompoint_captured;
 
 	// go to neutral team in the mean time
-	head = find(world, classname, "dom_team");
+	head = find(world, classname, "spawnfunc_dom_team");
 	while (head && head.netname != "")
-		head = find(head, classname, "dom_team");
+		head = find(head, classname, "spawnfunc_dom_team");
 	if(head == world)
 		return;
 
@@ -201,11 +201,11 @@
 	dompoint_captured();
 };
 
-/*QUAKED dom_team (0 .5 .8) (-32 -32 -24) (32 32 32)
+/*QUAKED spawnfunc_dom_team (0 .5 .8) (-32 -32 -24) (32 32 32)
 Team declaration for Domination gameplay, this allows you to decide what team
 names and control point models are used in your map.
 
-Note: If you use dom_team entities you must define at least 3 and only two
+Note: If you use spawnfunc_dom_team entities you must define at least 3 and only two
 can have netname set!  The nameless team owns all control points at start.
 
 Keys:
@@ -227,7 +227,7 @@
  (this is a global sound, like "Red team has captured a control point")
 */
 
-void() dom_team =
+void() spawnfunc_dom_team =
 {
 	if(!g_domination)
 	{
@@ -239,7 +239,7 @@
 		precache_sound(self.noise);
 	if (self.noise1 != "")
 		precache_sound(self.noise1);
-	self.classname = "dom_team";
+	self.classname = "spawnfunc_dom_team";
 	setmodel(self, self.model); // precision not needed
 	self.mdl = self.model;
 	self.dmg = self.modelindex;
@@ -252,14 +252,14 @@
 void() dom_controlpoint_setup =
 {
 	local entity head;
-	// find the dom_team representing unclaimed points
-	head = find(world, classname, "dom_team");
+	// find the spawnfunc_dom_team representing unclaimed points
+	head = find(world, classname, "spawnfunc_dom_team");
 	while(head && head.netname != "")
-		head = find(head, classname, "dom_team");
+		head = find(head, classname, "spawnfunc_dom_team");
 	if (!head)
-		objerror("no dom_team with netname \"\" found\n");
+		objerror("no spawnfunc_dom_team with netname \"\" found\n");
 
-	// copy important properties from dom_team entity
+	// copy important properties from spawnfunc_dom_team entity
 	self.goalentity = head;
 	setmodel(self, head.mdl); // precision already set
 	self.skin = head.skin;
@@ -308,7 +308,7 @@
 	totalteams = 0;
 
 	// first find out what teams are allowed
-	head = find(world, classname, "dom_team");
+	head = find(world, classname, "spawnfunc_dom_team");
 	while(head)
 	{
 		if(head.netname != "")
@@ -332,7 +332,7 @@
 					c4 = 0;
 			}
 		}
-		head = find(head, classname, "dom_team");
+		head = find(head, classname, "spawnfunc_dom_team");
 	}
 
 	// make sure there are at least 2 teams to join
@@ -483,10 +483,10 @@
 	SetPlayerColors(pl, selectedteam);
 }
 */
-/*QUAKED dom_controlpoint (0 .5 .8) (-16 -16 -24) (16 16 32)
+/*QUAKED spawnfunc_dom_controlpoint (0 .5 .8) (-16 -16 -24) (16 16 32)
 Control point for Domination gameplay.
 */
-void() dom_controlpoint =
+void() spawnfunc_dom_controlpoint =
 {
 	if(!g_domination)
 	{
@@ -510,7 +510,7 @@
 	local entity oldself;
 	oldself = self;
 	self = spawn();
-	self.classname = "dom_team";
+	self.classname = "spawnfunc_dom_team";
 	self.netname = teamname;
 	self.cnt = teamcolor;
 	self.model = pointmodel;
@@ -519,7 +519,7 @@
 	self.noise1 = capnarration;
 	self.message = capmessage;
 
-	// this code is identical to dom_team
+	// this code is identical to spawnfunc_dom_team
 	setmodel(self, self.model); // precision not needed
 	self.mdl = self.model;
 	self.dmg = self.modelindex;
@@ -537,11 +537,11 @@
 	local entity oldself;
 	oldself = self;
 	self = spawn();
-	self.classname = "dom_controlpoint";
-	self.think = dom_controlpoint;
+	self.classname = "spawnfunc_dom_controlpoint";
+	self.think = spawnfunc_dom_controlpoint;
 	self.nextthink = time;
 	self.origin = org;
-	dom_controlpoint();
+	spawnfunc_dom_controlpoint();
 	self = oldself;
 };
 
@@ -568,10 +568,10 @@
 	self.think = SUB_Remove;
 	self.nextthink = time;
 	// if no teams are found, spawn defaults
-	if (find(world, classname, "dom_team") == world)
+	if (find(world, classname, "spawnfunc_dom_team") == world)
 		dom_spawnteams();
 	// if no control points are found, spawn defaults
-	if (find(world, classname, "dom_controlpoint") == world)
+	if (find(world, classname, "spawnfunc_dom_controlpoint") == world)
 	{
 		// here follow default domination points for each map
 		/*
@@ -583,11 +583,11 @@
 		*/
 		{
 			// if no supported map was found, make every deathmatch spawn a point
-			head = find(world, classname, "info_player_deathmatch");
+			head = find(world, classname, "spawnfunc_info_player_deathmatch");
 			while (head)
 			{
 				dom_spawnpoint(head.origin);
-				head = find(head, classname, "info_player_deathmatch");
+				head = find(head, classname, "spawnfunc_info_player_deathmatch");
 			}
 		}
 	}
@@ -597,7 +597,7 @@
 {
 	local entity e;
 	// we have to precache default models/sounds even if they might not be
-	// used because worldspawn is executed before any other entities are read,
+	// used because spawnfunc_worldspawn is executed before any other entities are read,
 	// so we don't even know yet if this map is set up for domination...
 	precache_model("models/domination/dom_red.md3");
 	precache_model("models/domination/dom_blue.md3");

Modified: trunk/data/qcsrc/server/extensions.qh
===================================================================
--- trunk/data/qcsrc/server/extensions.qh	2008-05-30 08:45:55 UTC (rev 3666)
+++ trunk/data/qcsrc/server/extensions.qh	2008-06-01 13:23:44 UTC (rev 3667)
@@ -719,6 +719,12 @@
 //
 //NOTE: this extension is superseded by DP_QC_UNLIMITEDTEMPSTRINGS
 
+//DP_QC_NUM_FOR_EDICT
+//idea: Blub\0
+//darkplaces implementation: Blub\0
+//Function to get the number of an entity - a clean way.
+float(entity num) num_for_edict = #512;
+
 //DP_QC_RANDOMVEC
 //idea: LordHavoc
 //darkplaces implementation: LordHavoc
@@ -750,7 +756,7 @@
 //for more format codes please do a web search for strftime 3 and you should find the man(3) pages for this standard C function.
 //
 //practical uses:
-//changing day/night cycle (shops closing, monsters going on the prowl) in an RPG, for this you probably want to use s = strftime(TRUE, "%H");hour = ftos(s);
+//changing day/night cycle (shops closing, monsters going on the prowl) in an RPG, for this you probably want to use s = strftime(TRUE, "%H");hour = stof(s);
 //printing current date/time for competitive multiplayer games, such as the beginning/end of each round in real world time.
 //activating eastereggs in singleplayer games on certain dates.
 //
@@ -1054,6 +1060,17 @@
 //The first parameter provides the entities original contents, prior to the transition.  The second parameter provides the new contents.
 //NOTE: If this field function is provided on an entity, the standard watersplash sound IS SUPPRESSED to allow for authors to create their own transition sounds.
 
+//DP_SV_MOVETYPESTEP_LANDEVENT
+//idea: Dresk
+//darkplaces implementation: Dresk
+//field definitions:
+.void(vector vImpactVelocity) movetypesteplandevent;
+//description:
+//This field function, when provided, is triggered on a MOVETYPE_STEP entity when it experiences  "land event".
+// The standard engine behavior for this event is to play the sv_sound_land CVar sound.
+//The parameter provides the velocity of the entity at the time of the impact.  The z value may therefore be used to calculate how "hard" the entity struck the surface.
+//NOTE: If this field function is provided on a MOVETYPE_STEP entity, the standard sv_sound_land sound IS SUPPRESSED to allow for authors to create their own feedback.
+
 //DP_SV_POINTSOUND
 //idea: Dresk
 //darkplaces implementation: Dresk
@@ -1684,5 +1701,9 @@
 string(string in) uri_escape = #510;
 string(string in) uri_unescape = #511;
 
-void(float index, float type, ...) addstat = #232;
-float(entity ent) num_for_edict = #512;
+//DP_SV_SPAWNFUNC_PREFIX
+//idea: div0
+//darkplaces implementation: div0
+//Make functions whose name start with spawnfunc_ take precedence as spawn function for loading entities.
+//Useful if you have a field ammo_shells (required in any Quake mod) but want to support spawn functions called ammo_shells (like in Q3A).
+//Optionally, you can declare a global "float require_spawnfunc_prefix;" which will require ANY spawn function to start with that prefix.

Modified: trunk/data/qcsrc/server/g_decors.qc
===================================================================
--- trunk/data/qcsrc/server/g_decors.qc	2008-05-30 08:45:55 UTC (rev 3666)
+++ trunk/data/qcsrc/server/g_decors.qc	2008-06-01 13:23:44 UTC (rev 3667)
@@ -1,5 +1,5 @@
 
-float maxclients; // set by worldspawn code
+float maxclients; // set by spawnfunc_worldspawn code
 float numdecors;
 float maxdecors;
 .float createdtime;

Modified: trunk/data/qcsrc/server/g_lights.qc
===================================================================
--- trunk/data/qcsrc/server/g_lights.qc	2008-05-30 08:45:55 UTC (rev 3666)
+++ trunk/data/qcsrc/server/g_lights.qc	2008-06-01 13:23:44 UTC (rev 3667)
@@ -8,23 +8,23 @@
 .string dtagname;
 
 /*QUAKED dynlight (0 1 0) (-8 -8 -8) (8 8 8) START_OFF NOSHADOW FOLLOW
-Dynamic light.
-Can do one of these things: sit still and be just a silly light, travel along a path, follow an entity around, attach to a tag on an entity.
+Dynamic spawnfunc_light.
+Can do one of these things: sit still and be just a silly spawnfunc_light, travel along a path, follow an entity around, attach to a tag on an entity.
 It can spin around it's own axis in all the above cases.
 If targeted, it will toggle between on or off.
 keys:
-"light_lev" light radius, default 200
-"color" light color in rgb and brightness, 1 1 1 produces bright white, up to 255 255 255 (nuclear blast), recommended values up to 1 1 1, default 1 1 1
+"light_lev" spawnfunc_light radius, default 200
+"color" spawnfunc_light color in rgb and brightness, 1 1 1 produces bright white, up to 255 255 255 (nuclear blast), recommended values up to 1 1 1, default 1 1 1
 "style" lightstyle, same as for static lights
 "angles" initial orientation
 "avelocity" a vector value, the direction and speed it rotates in
 "skin" cubemap number, must be 16 or above
-"dtagname" will attach to this tag on the entity which "targetname" matches "target". If the "target" is either not an md3 model or is missing tags, it will attach to the targets origin. Note that the "target" must be visible to the light
+"dtagname" will attach to this tag on the entity which "targetname" matches "target". If the "target" is either not an md3 model or is missing tags, it will attach to the targets origin. Note that the "target" must be visible to the spawnfunc_light
 "targetname" will toggle on and off when triggered
-"target" if issued with a target, preferrably path_corner, it will move along the path. If also issued with the FOLLOW spawnflag, then this is the entity it will follow. If issued with the "tagname" key it will attach it to this targets tag called "tagname", does not work together with FOLLOW or path movement
+"target" if issued with a target, preferrably spawnfunc_path_corner, it will move along the path. If also issued with the FOLLOW spawnflag, then this is the entity it will follow. If issued with the "tagname" key it will attach it to this targets tag called "tagname", does not work together with FOLLOW or path movement
 "speed" the speed it will travel along the path, default 100
 flags:
-"START_OFF" light will be in off state until targeted
+"START_OFF" spawnfunc_light will be in off state until targeted
 "NOSHADOW" will not cast shadows in realtime lighting mode
 "FOLLOW" will follow the entity which "targetname" matches "target"
 */

Modified: trunk/data/qcsrc/server/g_subs.qc
===================================================================
--- trunk/data/qcsrc/server/g_subs.qc	2008-05-30 08:45:55 UTC (rev 3666)
+++ trunk/data/qcsrc/server/g_subs.qc	2008-06-01 13:23:44 UTC (rev 3667)
@@ -6,7 +6,7 @@
 //void() SUB_UseTargets;
 void() SUB_Remove;
 
-void info_null (void)
+void spawnfunc_info_null (void)
 {
 }
 

Modified: trunk/data/qcsrc/server/g_swamp.qc
===================================================================
--- trunk/data/qcsrc/server/g_swamp.qc	2008-05-30 08:45:55 UTC (rev 3666)
+++ trunk/data/qcsrc/server/g_swamp.qc	2008-06-01 13:23:44 UTC (rev 3667)
@@ -1,6 +1,6 @@
 /*
 *		t_swamp.c
-*		Adds trigger_swamp and suppoart routines for nexuiz 1.2.1+
+*		Adds spawnfunc_trigger_swamp and suppoart routines for nexuiz 1.2.1+
 *		Author tZork (Jakob MG) 
 *		jakob at games43.se
 *		2005 11 29

Modified: trunk/data/qcsrc/server/g_triggers.qc
===================================================================
--- trunk/data/qcsrc/server/g_triggers.qc	2008-05-30 08:45:55 UTC (rev 3666)
+++ trunk/data/qcsrc/server/g_triggers.qc	2008-06-01 13:23:44 UTC (rev 3667)
@@ -105,7 +105,7 @@
 
 
 
-void() trigger_reactivate =
+void() spawnfunc_trigger_reactivate =
 {
 	self.solid = SOLID_TRIGGER;
 };
@@ -209,12 +209,12 @@
 	}
 }
 
-/*QUAKED trigger_multiple (.5 .5 .5) ? notouch
+/*QUAKED spawnfunc_trigger_multiple (.5 .5 .5) ? notouch
 Variable sized repeatable trigger.  Must be targeted at one or more entities.  If "health" is set, the trigger must be killed to activate each time.
 If "delay" is set, the trigger waits some time after activating before firing.
 "wait" : Seconds between triggerings. (.2 default)
 If notouch is set, the trigger is only fired by other entities, not by touching.
-NOTOUCH has been obsoleted by trigger_relay!
+NOTOUCH has been obsoleted by spawnfunc_trigger_relay!
 sounds
 1)	secret
 2)	beep beep
@@ -222,7 +222,7 @@
 4)
 set "message" to text string
 */
-void() trigger_multiple =
+void() spawnfunc_trigger_multiple =
 {
 	if (self.sounds == 1)
 	{
@@ -266,7 +266,7 @@
 };
 
 
-/*QUAKED trigger_once (.5 .5 .5) ? notouch
+/*QUAKED spawnfunc_trigger_once (.5 .5 .5) ? notouch
 Variable sized trigger. Triggers once, then removes itself.  You must set the key "target" to the name of another object in the level that has a matching
 "targetname".  If "health" is set, the trigger must be killed to activate.
 If notouch is set, the trigger is only fired by other entities, not by touching.
@@ -279,18 +279,18 @@
 4)
 set "message" to text string
 */
-void() trigger_once =
+void() spawnfunc_trigger_once =
 {
 	self.wait = -1;
-	trigger_multiple();
+	spawnfunc_trigger_multiple();
 };
 
 //=============================================================================
 
-/*QUAKED trigger_relay (.5 .5 .5) (-8 -8 -8) (8 8 8)
+/*QUAKED spawnfunc_trigger_relay (.5 .5 .5) (-8 -8 -8) (8 8 8)
 This fixed size trigger cannot be touched, it can only be fired by other events.  It can contain killtargets, targets, delays, and messages.
 */
-void() trigger_relay =
+void() spawnfunc_trigger_relay =
 {
 	self.use = SUB_UseTargets;
 };
@@ -301,7 +301,7 @@
     self.nextthink = self.wait;
 }
 
-void() trigger_delay
+void() spawnfunc_trigger_delay
 {
     if(!self.wait)
         self.wait = 1;
@@ -342,14 +342,14 @@
 	multi_trigger ();
 };
 
-/*QUAKED trigger_counter (.5 .5 .5) ? nomessage
+/*QUAKED spawnfunc_trigger_counter (.5 .5 .5) ? nomessage
 Acts as an intermediary for an action that takes multiple inputs.
 
 If nomessage is not set, t will print "1 more.. " etc when triggered and "sequence complete" when finished.
 
 After the counter has been triggered "count" times (default 2), it will fire all of it's targets and remove itself.
 */
-void() trigger_counter =
+void() spawnfunc_trigger_counter =
 {
 	self.wait = -1;
 	if (!self.count)
@@ -359,7 +359,7 @@
 };
 
 .float triggerhurttime;
-void() hurt_touch =
+void() spawnfunc_hurt_touch =
 {
 	if (!other.owner)
 	{
@@ -379,15 +379,15 @@
 	return;
 };
 
-/*QUAKED trigger_hurt (.5 .5 .5) ?
+/*QUAKED spawnfunc_trigger_hurt (.5 .5 .5) ?
 Any object touching this will be hurt
 set dmg to damage amount
 defalt dmg = 5
 */
-void() trigger_hurt =
+void() spawnfunc_trigger_hurt =
 {
 	InitTrigger ();
-	self.touch = hurt_touch;
+	self.touch = spawnfunc_hurt_touch;
 	if (!self.dmg)
 		self.dmg = 1000;
 	if (!self.message)
@@ -395,9 +395,9 @@
 };
 
 //void() target_speaker_use = {sound(self, CHAN_VOICE, self.noise, 1, 1);}
-//void() target_speaker = {self.use = target_speaker_use;}
+//void() spawnfunc_target_speaker = {self.use = target_speaker_use;}
 
-void() target_speaker =
+void() spawnfunc_target_speaker =
 {
 if(self.noise) {
  precache_sound (self.noise);
@@ -407,7 +407,7 @@
 };
 
 
-void() func_stardust {
+void() spawnfunc_func_stardust {
 	self.effects = EF_STARDUST;
 }
 
@@ -460,7 +460,7 @@
 //	WriteByte (MSG_BROADCAST, self.cnt);
 };
 
-/*QUAKED func_rain (0 .5 .8) ?
+/*QUAKED spawnfunc_func_rain (0 .5 .8) ?
 This is an invisible area like a trigger, which rain falls inside of.
 
 Keys:
@@ -471,7 +471,7 @@
 "count"
  adjusts density, this many particles fall every second for a 1024x1024 area, default is 2000
 */
-void() func_rain =
+void() spawnfunc_func_rain =
 {
 	self.dest = self.velocity;
 	self.velocity = '0 0 0';
@@ -515,7 +515,7 @@
 //	WriteByte (MSG_BROADCAST, self.cnt);
 };
 
-/*QUAKED func_snow (0 .5 .8) ?
+/*QUAKED spawnfunc_func_snow (0 .5 .8) ?
 This is an invisible area like a trigger, which snow falls inside of.
 
 Keys:
@@ -526,7 +526,7 @@
 "count"
  adjusts density, this many particles fall every second for a 1024x1024 area, default is 2000
 */
-void() func_snow =
+void() spawnfunc_func_snow =
 {
 	self.dest = self.velocity;
 	self.velocity = '0 0 0';
@@ -593,11 +593,11 @@
 	}
 	self.nextthink = time;
 }
-/*QUAKED misc_laser (.5 .5 .5) ?
+/*QUAKED spawnfunc_misc_laser (.5 .5 .5) ?
 Any object touching the beam will be hurt
 Keys:
 "target"
- target_position where the laser ends
+ spawnfunc_target_position where the laser ends
 "mdl"
  name of beam effect to use
 "dmg"
@@ -605,7 +605,7 @@
 "wait"
  delay between sending the particle effect
 */
-void() misc_laser =
+void() spawnfunc_misc_laser =
 {
 	if(self.mdl)
 	{
@@ -620,7 +620,7 @@
 	if(!self.wait)
 		self.wait = 1;
 	if(!self.message)
-		self.message = "saw the light";
+		self.message = "saw the spawnfunc_light";
 	self.think = misc_laser_think;
 	self.nextthink = time;
 }
@@ -690,9 +690,9 @@
 }
 
 
-/*QUAKED trigger_impulse (.5 .5 .5) ?
+/*QUAKED spawnfunc_trigger_impulse (.5 .5 .5) ?
 -------- KEYS --------
-target : If this is set, this points to the target_position to which the player will get pushed.
+target : If this is set, this points to the spawnfunc_target_position to which the player will get pushed.
          If not, this trigger acts like a damper/accelerator field.
 
 strength : This is how mutch force to add in the direction of .target each second
@@ -704,7 +704,7 @@
 in directional push mode. For damper/accelerator mode this is no nessesary (and has no effect).
 */
 
-void trigger_impulse()
+void spawnfunc_trigger_impulse()
 {
     InitTrigger ();
     if(self.target)

Modified: trunk/data/qcsrc/server/g_world.qc
===================================================================
--- trunk/data/qcsrc/server/g_world.qc	2008-05-30 08:45:55 UTC (rev 3666)
+++ trunk/data/qcsrc/server/g_world.qc	2008-06-01 13:23:44 UTC (rev 3667)
@@ -162,12 +162,12 @@
 }
 
 float world_already_spawned;
-void worldspawn (void)
+void spawnfunc_worldspawn (void)
 {
 	dprint_load(); // load dprint status from cvar
 
 	if(world_already_spawned)
-		error("world already spawned - you may have EXACTLY ONE worldspawn!");
+		error("world already spawned - you may have EXACTLY ONE spawnfunc_worldspawn!");
 	world_already_spawned = TRUE;
 
 	if(GotoFirstMap())
@@ -227,7 +227,7 @@
 	// 11 SLOW PULSE NOT FADE TO BLACK
 	lightstyle(11, "abcdefghijklmnopqrrqponmlkjihgfedcba");
 
-	// styles 32-62 are assigned by the light program for switchable lights
+	// styles 32-62 are assigned by the spawnfunc_light program for switchable lights
 
 	// 63 testing
 	lightstyle(63, "a");
@@ -334,7 +334,7 @@
 	world_initialized = 1;
 }
 
-void light (void)
+void spawnfunc_light (void)
 {
 	//makestatic (self); // Who the f___ did that?
 	remove(self);
@@ -891,7 +891,7 @@
 	}
 
 // then look for the start position
-	spot = find (world, classname, "info_player_start");
+	spot = find (world, classname, "spawnfunc_info_player_start");
 	if (spot)
 		return spot;
 
@@ -901,7 +901,7 @@
 		return spot;
 
 // then look for the start position
-	spot = find (world, classname, "info_player_deathmatch");
+	spot = find (world, classname, "spawnfunc_info_player_deathmatch");
 	if (spot)
 		return spot;
 
@@ -1106,7 +1106,7 @@
 	if(self.deadflag == DEAD_NO)
 		self.play_time += frametime;
 
-	// fixme: don't check players; instead check dom_team and ctf_team entities
+	// fixme: don't check players; instead check spawnfunc_dom_team and spawnfunc_ctf_team entities
 	//   (div0: and that in CheckRules_World please)
 };
 
@@ -1185,7 +1185,7 @@
 	local float t1, t2, t3, t4;
 	// first check if the game has ended
 	t1 = t2 = t3 = t4 = 0;
-	head = find(world, classname, "onslaught_generator");
+	head = find(world, classname, "spawnfunc_onslaught_generator");
 	while (head)
 	{
 		if (head.health > 0)
@@ -1195,7 +1195,7 @@
 			if (head.team == COLOR_TEAM3) t3 = 1;
 			if (head.team == COLOR_TEAM4) t4 = 1;
 		}
-		head = find(head, classname, "onslaught_generator");
+		head = find(head, classname, "spawnfunc_onslaught_generator");
 	}
 	if (t1 + t2 + t3 + t4 < 2)
 	{
@@ -1250,7 +1250,7 @@
 	}
 
 	local entity ent;
-	ent = find(world, classname, "target_assault_roundend");
+	ent = find(world, classname, "spawnfunc_target_assault_roundend");
 	if(ent)
 	{
 		if(ent.winning)	// round end has been triggered by attacking team
@@ -1657,7 +1657,7 @@
 			team4_score = 1;
 	}
 
-	for(head = world; (head = find(head, classname, "info_player_deathmatch")) != world; )
+	for(head = world; (head = find(head, classname, "spawnfunc_info_player_deathmatch")) != world; )
 	{
 		if(head.team == COLOR_TEAM1)
 			team1_score = 1;

Modified: trunk/data/qcsrc/server/havocbot_roles.qc
===================================================================
--- trunk/data/qcsrc/server/havocbot_roles.qc	2008-05-30 08:45:55 UTC (rev 3666)
+++ trunk/data/qcsrc/server/havocbot_roles.qc	2008-06-01 13:23:44 UTC (rev 3667)
@@ -36,7 +36,7 @@
 void(float ratingscale, vector org, float sradius) havocbot_goalrating_controlpoints =
 {
 	local entity head;
-	head = findchain(classname, "dom_controlpoint");
+	head = findchain(classname, "spawnfunc_dom_controlpoint");
 	while (head)
 	{
 		if (vlen(head.origin - org) < sradius)
@@ -59,7 +59,7 @@
 void(float ratingscale, vector org, float sradius) havocbot_goalrating_waypoints =
 {
 	local entity head;
-	head = findchain(classname, "waypoint");
+	head = findchain(classname, "spawnfunc_waypoint");
 	while (head)
 	{
 		if (vlen(head.origin - org) < sradius && vlen(head.origin - org) > 100)

Modified: trunk/data/qcsrc/server/miscfunctions.qc
===================================================================
--- trunk/data/qcsrc/server/miscfunctions.qc	2008-05-30 08:45:55 UTC (rev 3666)
+++ trunk/data/qcsrc/server/miscfunctions.qc	2008-06-01 13:23:44 UTC (rev 3667)
@@ -1,4 +1,4 @@
-void() info_player_deathmatch; // needed for the other spawnpoints
+void() spawnfunc_info_player_deathmatch; // needed for the other spawnpoints
 void() spawnpoint_use;
 string ColoredTeamName(float t);
 
@@ -301,16 +301,16 @@
 	return nearest_entity[0];
 }
 
-void() target_location =
+void() spawnfunc_target_location =
 {
-	self.classname = "target_location";
+	self.classname = "spawnfunc_target_location";
 	// location name in netname
 	// eventually support: count, teamgame selectors, line of sight?
 };
 
-void() info_location =
+void() spawnfunc_info_location =
 {
-	self.classname = "target_location";
+	self.classname = "spawnfunc_target_location";
 	self.message = self.netname;
 };
 
@@ -319,7 +319,7 @@
 	entity loc;
 	string ret;
 	ret = "somewhere";
-	loc = findnearest(p, classname, "target_location", '1 1 1');
+	loc = findnearest(p, classname, "spawnfunc_target_location", '1 1 1');
 	if(loc)
 	{
 		ret = loc.message;

Modified: trunk/data/qcsrc/server/mode_onslaught.qc
===================================================================
--- trunk/data/qcsrc/server/mode_onslaught.qc	2008-05-30 08:45:55 UTC (rev 3666)
+++ trunk/data/qcsrc/server/mode_onslaught.qc	2008-06-01 13:23:44 UTC (rev 3667)
@@ -20,9 +20,9 @@
 	local float stop, t1, t2, t3, t4;
 	// first check if the game has ended
 	dprint("--- updatelinks ---\n");
-	links = findchain(classname, "onslaught_link");
+	links = findchain(classname, "spawnfunc_onslaught_link");
 	// mark generators as being shielded and networked
-	l = findchain(classname, "onslaught_generator");
+	l = findchain(classname, "spawnfunc_onslaught_generator");
 	while (l)
 	{
 		if (l.iscaptured)
@@ -34,7 +34,7 @@
 		l = l.chain;
 	}
 	// mark points as shielded and not networked
-	l = findchain(classname, "onslaught_controlpoint");
+	l = findchain(classname, "spawnfunc_onslaught_controlpoint");
 	while (l)
 	{
 		l.islinked = FALSE;
@@ -93,7 +93,7 @@
 			{
 				dprint(etos(l), " (link) is unshielding ", etos(l.enemy), " (point) because its team does not match ", etos(l.goalentity), " (point)\n");
 				l.enemy.isshielded = FALSE;
-				if(l.goalentity.classname == "onslaught_generator")
+				if(l.goalentity.classname == "spawnfunc_onslaught_generator")
 				{
 					if(l.goalentity.team == COLOR_TEAM1)
 						l.enemy.isgenneighbor_red = TRUE;
@@ -112,7 +112,7 @@
 			{
 				dprint(etos(l), " (link) is unshielding ", etos(l.goalentity), " (point) because its team does not match ", etos(l.enemy), " (point)\n");
 				l.goalentity.isshielded = FALSE;
-				if(l.enemy.classname == "onslaught_generator")
+				if(l.enemy.classname == "spawnfunc_onslaught_generator")
 				{
 					if(l.enemy.team == COLOR_TEAM1)
 						l.goalentity.isgenneighbor_red = TRUE;
@@ -131,7 +131,7 @@
 		l = l.chain;
 	}
 	// now update the takedamage and alpha variables on generator shields
-	l = findchain(classname, "onslaught_generator");
+	l = findchain(classname, "spawnfunc_onslaught_generator");
 	while (l)
 	{
 		if (l.isshielded)
@@ -151,7 +151,7 @@
 		l = l.chain;
 	}
 	// now update the takedamage and alpha variables on control point icons
-	l = findchain(classname, "onslaught_controlpoint");
+	l = findchain(classname, "spawnfunc_onslaught_controlpoint");
 	while (l)
 	{
 		if (l.isshielded)
@@ -178,7 +178,7 @@
 	}
 	// count generators owned by each team
 	t1 = t2 = t3 = t4 = 0;
-	l = findchain(classname, "onslaught_generator");
+	l = findchain(classname, "spawnfunc_onslaught_generator");
 	while (l)
 	{
 		if (l.iscaptured)
@@ -219,7 +219,7 @@
 	// check to see if this player has a legitimate claim to capture this
 	// control point - more specifically that there is a captured path of
 	// points leading back to the team generator
-	e = findchain(classname, "onslaught_link");
+	e = findchain(classname, "spawnfunc_onslaught_link");
 	while (e)
 	{
 		if (e.goalentity == cp)
@@ -321,7 +321,7 @@
 		// control points reduce the overtime duration.
 		sound(self, CHAN_AUTO, "sound/onslaught/generator_decay.wav", 1, ATTN_NORM);
 		d = 1;
-		e = findchain(classname, "onslaught_controlpoint");
+		e = findchain(classname, "spawnfunc_onslaught_controlpoint");
 		while (e)
 		{
 			if (e.team != self.team)
@@ -485,16 +485,16 @@
 	return 0;
 }
 
-/*QUAKED onslaught_generator (0 .5 .8) (-32 -32 -24) (32 32 64)
+/*QUAKED spawnfunc_onslaught_generator (0 .5 .8) (-32 -32 -24) (32 32 64)
 Base generator.
 
-onslaught_link entities can target this.
+spawnfunc_onslaught_link entities can target this.
 
 keys:
 "team" - team that owns this generator (5 = red, 14 = blue, etc), MUST BE SET.
-"targetname" - name that onslaught_link entities will use to target this.
+"targetname" - name that spawnfunc_onslaught_link entities will use to target this.
 */
-void() onslaught_generator =
+void() spawnfunc_onslaught_generator =
 {
 	if (!g_onslaught)
 	{
@@ -724,17 +724,17 @@
 	self.colormap = e.colormap;
 };
 
-/*QUAKED onslaught_controlpoint (0 .5 .8) (-32 -32 0) (32 32 128)
+/*QUAKED spawnfunc_onslaught_controlpoint (0 .5 .8) (-32 -32 0) (32 32 128)
 Control point.  Be sure to give this enough clearance so that the shootable part has room to exist
 
-This should link to an onslaught_controlpoint entity or onslaught_generator entity.
+This should link to an spawnfunc_onslaught_controlpoint entity or spawnfunc_onslaught_generator entity.
 
 keys:
-"targetname" - name that onslaught_link entities will use to target this.
+"targetname" - name that spawnfunc_onslaught_link entities will use to target this.
 "target" - target any entities that are tied to this control point, such as vehicles and buildable structure entities.
 "message" - name of this control point (should reflect the location in the map, such as "center bridge", "north tower", etc)
 */
-void() onslaught_controlpoint =
+void() spawnfunc_onslaught_controlpoint =
 {
 	local entity e;
 	if (!g_onslaught)
@@ -810,16 +810,16 @@
 	dprint(etos(self.goalentity), " linked with ", etos(self.enemy), "\n");
 }
 
-/*QUAKED onslaught_link (0 .5 .8) (-16 -16 -16) (16 16 16)
+/*QUAKED spawnfunc_onslaught_link (0 .5 .8) (-16 -16 -16) (16 16 16)
 Link between control points.
 
-This entity targets two different onslaught_controlpoint or onslaught_generator entities, and suppresses shielding on both if they are owned by different teams.
+This entity targets two different spawnfunc_onslaught_controlpoint or spawnfunc_onslaught_generator entities, and suppresses shielding on both if they are owned by different teams.
 
 keys:
 "target" - first control point.
 "target2" - second control point.
 */
-void() onslaught_link =
+void() spawnfunc_onslaught_link =
 {
 	if (!g_onslaught)
 	{

Modified: trunk/data/qcsrc/server/runematch.qc
===================================================================
--- trunk/data/qcsrc/server/runematch.qc	2008-05-30 08:45:55 UTC (rev 3666)
+++ trunk/data/qcsrc/server/runematch.qc	2008-06-01 13:23:44 UTC (rev 3667)
@@ -27,11 +27,11 @@
 
 */
 
-/*QUAKED runematch_spawn_point (1 0 0) (-16 -16 -24) (16 16 24)
+/*QUAKED spawnfunc_runematch_spawn_point (1 0 0) (-16 -16 -24) (16 16 24)
 spawn point for runes in runematch
 */
 
-void runematch_spawn_point()
+void spawnfunc_runematch_spawn_point()
 {
 	if(!g_runematch)
 	{
@@ -102,7 +102,7 @@
 	float num;
 	entity e;
 	num = 0;
-	e = findchain(classname, "runematch_spawn_point");
+	e = findchain(classname, "spawnfunc_runematch_spawn_point");
 	while(e)
 	{
 		num = num + 1;
@@ -118,9 +118,9 @@
 	e = world;
 	do
 	{
-		e = find(e, classname, "runematch_spawn_point");
+		e = find(e, classname, "spawnfunc_runematch_spawn_point");
 		if(!e)
-			e = find(e, classname, "runematch_spawn_point");
+			e = find(e, classname, "spawnfunc_runematch_spawn_point");
 		if(!e)
 			break;
 
@@ -187,7 +187,7 @@
 		return; // "notouch" time isn't finished
 
 	// detach from the spawn point you're on
-	if(self.owner.classname == "runematch_spawn_point")
+	if(self.owner.classname == "spawnfunc_runematch_spawn_point")
 	{
 		self.owner.owner = world;
 		self.owner = world;
@@ -230,7 +230,7 @@
 	num = count_rune_spawnpoints();
 	r = ceil(random()*num);
 
-	if(self.owner.classname == "runematch_spawn_point")
+	if(self.owner.classname == "spawnfunc_runematch_spawn_point")
 	{
 		self.owner.owner = world;
 		self.owner = world;
@@ -436,13 +436,13 @@
 void spawn_default_runespawnpoints()
 {
 	entity spot, e;
-	spot = find(world, classname, "info_player_deathmatch");
+	spot = find(world, classname, "spawnfunc_info_player_deathmatch");
 	while(spot)
 	{
 		e = spawn();
-		e.classname = "runematch_spawn_point";
+		e.classname = "spawnfunc_runematch_spawn_point";
 		e.origin = spot.origin;
-		spot = find(spot, classname, "info_player_deathmatch");
+		spot = find(spot, classname, "spawnfunc_info_player_deathmatch");
 	}
 }
 

Modified: trunk/data/qcsrc/server/t_halflife.qc
===================================================================
--- trunk/data/qcsrc/server/t_halflife.qc	2008-05-30 08:45:55 UTC (rev 3666)
+++ trunk/data/qcsrc/server/t_halflife.qc	2008-06-01 13:23:44 UTC (rev 3667)
@@ -6,33 +6,33 @@
 .float  rendermode;
 .vector rendercolor;
 
-void() weapon_crossbow = {};
-void() weapon_handgrenade = {};
-void() ammo_crossbow = {};
-void() ammo_9mmclip = {};
-void() ammo_gaussclip = {};
-void() weapon_rpg = {};
-void() weapon_357 = {};
+void() spawnfunc_weapon_crossbow = {};
+void() spawnfunc_weapon_handgrenade = {};
+void() spawnfunc_ammo_crossbow = {};
+void() spawnfunc_ammo_9mmclip = {};
+void() spawnfunc_ammo_gaussclip = {};
+void() spawnfunc_weapon_rpg = {};
+void() spawnfunc_weapon_357 = {};
 void() ammo_ARgrenades = {};
-void() item_battery = {};
-void() ammo_rpgclip = {};
+void() spawnfunc_item_battery = {};
+void() spawnfunc_ammo_rpgclip = {};
 void() weapon_9mmAR = {};
-void() weapon_tripmine = {};
-void() weapon_snark = {};
-void() ammo_buckshot = {};
+void() spawnfunc_weapon_tripmine = {};
+void() spawnfunc_weapon_snark = {};
+void() spawnfunc_ammo_buckshot = {};
 void() ammo_9mmAR = {};
-void() ammo_357 = {};
-void() weapon_gauss = {};
-void() weapon_hornetgun = {};
-//void() weapon_shotgun = {};
-void() item_healthkit = {};
-void() item_longjump = {};
-void() item_antidote = {};
-void() func_recharge = {};
-void() info_node = {};
-void() env_sound = {};
-void() light_spot = {};
-void() func_healthcharger = {};
+void() spawnfunc_ammo_357 = {};
+void() spawnfunc_weapon_gauss = {};
+void() spawnfunc_weapon_hornetgun = {};
+//void() spawnfunc_weapon_shotgun = {};
+void() spawnfunc_item_healthkit = {};
+void() spawnfunc_item_longjump = {};
+void() spawnfunc_item_antidote = {};
+void() spawnfunc_func_recharge = {};
+void() spawnfunc_info_node = {};
+void() spawnfunc_env_sound = {};
+void() spawnfunc_light_spot = {};
+void() spawnfunc_func_healthcharger = {};
 
 
 void() func_ladder_touch =
@@ -43,13 +43,13 @@
 	other.ladder_entity = self;
 };
 
-void() func_ladder =
+void() spawnfunc_func_ladder =
 {
 	InitTrigger ();
 	self.touch = func_ladder_touch;
 };
 
-void() func_water =
+void() spawnfunc_func_water =
 {
 	self.solid = SOLID_TRIGGER;
 	setmodel (self, self.model);	// set size and link into world, precision set by mapper

Modified: trunk/data/qcsrc/server/t_items.qc
===================================================================
--- trunk/data/qcsrc/server/t_items.qc	2008-05-30 08:45:55 UTC (rev 3666)
+++ trunk/data/qcsrc/server/t_items.qc	2008-06-01 13:23:44 UTC (rev 3667)
@@ -305,7 +305,7 @@
 		{
 			// first nudge it off the floor a little bit to avoid math errors
 			setorigin(self, self.origin + '0 0 1');
-			// set item size before we spawn a waypoint
+			// set item size before we spawn a spawnfunc_waypoint
 			if((itemflags & FL_POWERUP) || self.health || self.armorvalue)
 				setsize (self, '-16 -16 0', '16 16 48');
 			else
@@ -515,14 +515,14 @@
 
 float weaponswapping;
 
-void weapon_shotgun (void);
-void weapon_uzi (void) {
+void spawnfunc_weapon_shotgun (void);
+void spawnfunc_weapon_uzi (void) {
 	if(!weaponswapping)
 	if(q3acompat_machineshotgunswap)
 	if(self.classname != "droppedweapon")
 	{
 		weaponswapping = TRUE;
-		weapon_shotgun();
+		spawnfunc_weapon_shotgun();
 		weaponswapping = FALSE;
 		return;
 	}
@@ -534,13 +534,13 @@
 		weapon_action(WEP_UZI, WR_PRECACHE);
 }
 
-void weapon_shotgun (void) {
+void spawnfunc_weapon_shotgun (void) {
 	if(!weaponswapping)
 	if(q3acompat_machineshotgunswap)
 	if(self.classname != "droppedweapon")
 	{
 		weaponswapping = TRUE;
-		weapon_uzi();
+		spawnfunc_weapon_uzi();
 		weaponswapping = FALSE;
 		return;
 	}
@@ -552,7 +552,7 @@
 		weapon_action(WEP_SHOTGUN, WR_PRECACHE);
 }
 
-void weapon_grenadelauncher (void)
+void spawnfunc_weapon_grenadelauncher (void)
 {
 	if(!self.ammo_rockets)
 		self.ammo_rockets = cvar("g_pickup_rockets");
@@ -561,7 +561,7 @@
 		weapon_action(WEP_GRENADE_LAUNCHER, WR_PRECACHE);
 }
 
-void weapon_electro (void)
+void spawnfunc_weapon_electro (void)
 {
 	if(!self.ammo_cells)
 		self.ammo_cells = cvar("g_pickup_cells");
@@ -570,7 +570,7 @@
 		weapon_action(WEP_ELECTRO, WR_PRECACHE);
 }
 
-void weapon_crylink (void)
+void spawnfunc_weapon_crylink (void)
 {
 	if(!self.ammo_cells)
 		self.ammo_cells = cvar("g_pickup_cells");
@@ -579,7 +579,7 @@
 		weapon_action(WEP_CRYLINK, WR_PRECACHE);
 }
 
-void weapon_nex (void)
+void spawnfunc_weapon_nex (void)
 {
 	float nextime;
 	if (g_minstagib)
@@ -601,7 +601,7 @@
 		weapon_action(WEP_NEX, WR_PRECACHE);
 }
 
-void weapon_hagar (void)
+void spawnfunc_weapon_hagar (void)
 {
 	if(!self.ammo_rockets)
 		self.ammo_rockets = cvar("g_pickup_rockets");
@@ -610,7 +610,7 @@
 		weapon_action(WEP_HAGAR, WR_PRECACHE);
 }
 
-void weapon_rocketlauncher (void)
+void spawnfunc_weapon_rocketlauncher (void)
 {
 	if (g_minstagib)
 	{
@@ -626,20 +626,20 @@
 		weapon_action(WEP_ROCKET_LAUNCHER, WR_PRECACHE);
 }
 
-void item_rockets (void) {
+void spawnfunc_item_rockets (void) {
 	if(!self.ammo_rockets)
 		self.ammo_rockets = g_pickup_rockets;
 	StartItem ("models/items/a_rockets.md3", "misc/itempickup.wav", 15, "rockets", IT_ROCKETS, 0, commodity_pickupevalfunc, 3000);
 }
 
-void item_shells (void);
-void item_bullets (void) {
+void spawnfunc_item_shells (void);
+void spawnfunc_item_bullets (void) {
 	if(!weaponswapping)
 	if(q3acompat_machineshotgunswap)
 	if(self.classname != "droppedweapon")
 	{
 		weaponswapping = TRUE;
-		item_shells();
+		spawnfunc_item_shells();
 		weaponswapping = FALSE;
 		return;
 	}
@@ -649,19 +649,19 @@
 	StartItem ("models/items/a_bullets.mdl", "misc/itempickup.wav", 15, "bullets", IT_NAILS, 0, commodity_pickupevalfunc, 2000);
 }
 
-void item_cells (void) {
+void spawnfunc_item_cells (void) {
 	if(!self.ammo_cells)
 		self.ammo_cells = g_pickup_cells;
 	StartItem ("models/items/a_cells.md3", "misc/itempickup.wav", 15, "cells", IT_CELLS, 0, commodity_pickupevalfunc, 2000);
 }
 
-void item_shells (void) {
+void spawnfunc_item_shells (void) {
 	if(!weaponswapping)
 	if(q3acompat_machineshotgunswap)
 	if(self.classname != "droppedweapon")
 	{
 		weaponswapping = TRUE;
-		item_bullets();
+		spawnfunc_item_bullets();
 		weaponswapping = FALSE;
 		return;
 	}
@@ -671,7 +671,7 @@
 	StartItem ("models/items/a_shells.md3", "misc/itempickup.wav", 15, "shells", IT_SHELLS, 0, commodity_pickupevalfunc, 500);
 }
 
-void item_armor_small (void) {
+void spawnfunc_item_armor_small (void) {
 	if(!self.armorvalue)
 		self.armorvalue = g_pickup_armorsmall;
 	if(!self.max_armorvalue)
@@ -679,7 +679,7 @@
 	StartItem ("models/items/g_a1.md3", "misc/armor1.wav", 15, "5 Armor", IT_ARMOR_SHARD, 0, commodity_pickupevalfunc, 1000);
 }
 
-void item_armor_medium (void) {
+void spawnfunc_item_armor_medium (void) {
 	if(!self.armorvalue)
 		self.armorvalue = g_pickup_armormedium;
 	if(!self.max_armorvalue)
@@ -687,7 +687,7 @@
 	StartItem ("models/items/g_armormedium.md3", "misc/armor1.wav", 30, "25 Armor", IT_ARMOR, 0, commodity_pickupevalfunc, 20000);
 }
 
-void item_armor_large (void) {
+void spawnfunc_item_armor_large (void) {
 	if(!self.armorvalue)
 		self.armorvalue = g_pickup_armorlarge;
 	if(!self.max_armorvalue)
@@ -695,7 +695,7 @@
 	StartItem ("models/items/g_a25.md3", "misc/armor25.wav", 30, "100 Armor", IT_ARMOR, 0, commodity_pickupevalfunc, 20000);
 }
 
-void item_health_small (void) {
+void spawnfunc_item_health_small (void) {
 	if(!self.max_health)
 		self.max_health = g_pickup_healthsmall_max;
 	if(!self.health)
@@ -703,7 +703,7 @@
 	StartItem ("models/items/g_h1.md3", "misc/minihealth.wav", 15, "5 Health", IT_5HP, 0, commodity_pickupevalfunc, 20000);
 }
 
-void item_health_medium (void) {
+void spawnfunc_item_health_medium (void) {
 	if(!self.max_health)
 		self.max_health = g_pickup_healthmedium_max;
 	if(!self.health)
@@ -711,7 +711,7 @@
 	StartItem ("models/items/g_h25.md3", "misc/mediumhealth.wav", 15, "25 Health", IT_25HP, 0, commodity_pickupevalfunc, 20000);
 }
 
-void item_health_large (void) {
+void spawnfunc_item_health_large (void) {
 	if(!self.max_health)
 		self.max_health = g_pickup_healthlarge_max;
 	if(!self.health)
@@ -719,7 +719,7 @@
 	StartItem ("models/items/g_h50.md3", "misc/mediumhealth.wav", 15, "50 Health", IT_25HP, 0, commodity_pickupevalfunc, 20000);
 }
 
-void item_health_mega (void) {
+void spawnfunc_item_health_mega (void) {
 	if(!cvar("g_powerup_superhealth"))
 		return;
 
@@ -738,13 +738,13 @@
 }
 
 // support old misnamed entities
-void item_armor1() { item_armor_small(); }  // FIXME: in Quake this is green armor, in Nexuiz maps it is an armor shard
-void item_armor25() { item_armor_large(); }
-void item_health1() { item_health_small(); }
-void item_health25() { item_health_medium(); }
-void item_health100() { item_health_mega(); }
+void spawnfunc_item_armor1() { spawnfunc_item_armor_small(); }  // FIXME: in Quake this is green armor, in Nexuiz maps it is an armor shard
+void spawnfunc_item_armor25() { spawnfunc_item_armor_large(); }
+void spawnfunc_item_health1() { spawnfunc_item_health_small(); }
+void spawnfunc_item_health25() { spawnfunc_item_health_medium(); }
+void spawnfunc_item_health100() { spawnfunc_item_health_mega(); }
 
-void item_strength (void) {
+void spawnfunc_item_strength (void) {
 	if(!cvar("g_powerup_strength"))
 		return;
 
@@ -760,7 +760,7 @@
 	}
 }
 
-void item_invincible (void) {
+void spawnfunc_item_invincible (void) {
 	if(!cvar("g_powerup_shield"))
 		return;
 
@@ -778,7 +778,7 @@
 //void item_speed (void) {self.speed_finished = 30;StartItem ("models/items/g_speed.md3", "misc/powerup.wav", 120, "Speed Powerup", IT_SPEED, FL_POWERUP, generic_pickupevalfunc, 10000);}
 //void item_slowmo (void) {self.slowmo_finished = 30;StartItem ("models/items/g_slowmo.md3", "misc/powerup.wav", 120, "Slow Motion", IT_SLOWMO, FL_POWERUP, generic_pickupevalfunc, 10000);}
 
-void item_minst_cells (void) {
+void spawnfunc_item_minst_cells (void) {
 	if (g_minstagib)
 	{
 		minst_no_auto_cells = 1;
@@ -789,9 +789,9 @@
 }
 
 // compatibility:
-void item_quad (void) {self.classname = "item_strength";item_strength();}
+void spawnfunc_item_quad (void) {self.classname = "spawnfunc_item_strength";spawnfunc_item_strength();}
 
-void misc_models (void)
+void spawnfunc_misc_models (void)
 {
 	precache_model (self.model);
 	setmodel (self, self.model); // precision set by mapper
@@ -812,7 +812,7 @@
 	self.colormap |= 1024; // RENDER_COLORMAPPED
 }
 
-void func_wall (void)
+void spawnfunc_func_wall (void)
 {
 	precache_model (self.model);
 	setmodel (self, self.model); // precision set by mapper
@@ -860,14 +860,14 @@
 {
 	switch(it)
 	{
-		case IT_SHOTGUN:          weapon_shotgun(); break;
-		case IT_UZI:              weapon_uzi(); break;
-		case IT_GRENADE_LAUNCHER: weapon_grenadelauncher(); break;
-		case IT_ELECTRO:          weapon_electro(); break;
-		case IT_CRYLINK:          weapon_crylink(); break;
-		case IT_NEX:              weapon_nex(); break;
-		case IT_HAGAR:            weapon_hagar(); break;
-		case IT_ROCKET_LAUNCHER:  weapon_rocketlauncher(); break;
+		case IT_SHOTGUN:          spawnfunc_weapon_shotgun(); break;
+		case IT_UZI:              spawnfunc_weapon_uzi(); break;
+		case IT_GRENADE_LAUNCHER: spawnfunc_weapon_grenadelauncher(); break;
+		case IT_ELECTRO:          spawnfunc_weapon_electro(); break;
+		case IT_CRYLINK:          spawnfunc_weapon_crylink(); break;
+		case IT_NEX:              spawnfunc_weapon_nex(); break;
+		case IT_HAGAR:            spawnfunc_weapon_hagar(); break;
+		case IT_ROCKET_LAUNCHER:  spawnfunc_weapon_rocketlauncher(); break;
 		// add all other item spawn functions here
 		default:
 			error("requested item can't be spawned");

Modified: trunk/data/qcsrc/server/t_jumppads.qc
===================================================================
--- trunk/data/qcsrc/server/t_jumppads.qc	2008-05-30 08:45:55 UTC (rev 3666)
+++ trunk/data/qcsrc/server/t_jumppads.qc	2008-06-01 13:23:44 UTC (rev 3667)
@@ -187,7 +187,7 @@
 		self.enemy = find(world, targetname, self.target);
 		if (!self.enemy)
 		{
-			objerror("trigger_push: target not found\n");
+			objerror("spawnfunc_trigger_push: target not found\n");
 			remove(self);
 			return;
 		}
@@ -198,7 +198,7 @@
 	else
 		flighttime = 0;
 
-	// calculate the destination and spawn a teleporter waypoint
+	// calculate the destination and spawn a teleporter spawnfunc_waypoint
 	e = spawn();
 	setorigin(e, org);
 	setsize(e, PL_MIN, PL_MAX);
@@ -222,7 +222,7 @@
  *            values to target a point on the ceiling.
  *   movedir: if target is not set, this * speed * 10 is the velocity to be reached.
  */
-void() trigger_push =
+void() spawnfunc_trigger_push =
 {
 	if (self.angles != '0 0 0')
 		SetMovedir ();
@@ -249,6 +249,6 @@
 	self.nextthink = time + 0.2;
 };
 
-void() target_push = {};
-void() info_notnull = {};
-void() target_position = {};
+void() spawnfunc_target_push = {};
+void() spawnfunc_info_notnull = {};
+void() spawnfunc_target_position = {};

Modified: trunk/data/qcsrc/server/t_plats.qc
===================================================================
--- trunk/data/qcsrc/server/t_plats.qc	2008-05-30 08:45:55 UTC (rev 3666)
+++ trunk/data/qcsrc/server/t_plats.qc	2008-06-01 13:23:44 UTC (rev 3667)
@@ -143,8 +143,8 @@
 
 .string sound1, sound2;
 
-void() path_corner = { };
-void() func_plat =
+void() spawnfunc_path_corner = { };
+void() spawnfunc_func_plat =
 {
 	if (!self.t_length)
 		self.t_length = 80;
@@ -285,12 +285,12 @@
 };
 
 
-void() func_train =
+void() spawnfunc_func_train =
 {
 	if (!self.speed)
 		self.speed = 100;
 	if (!self.target)
-		objerror ("func_train without a target");
+		objerror ("spawnfunc_func_train without a target");
 
 	if (self.sounds == 0)
 	{
@@ -356,15 +356,15 @@
 	self.think = train_next;
 };
 
-/*QUAKED func_train (0 .5 .8) ?
-Ridable platform, targets path_corner path to follow.
-speed : speed the train moves (can be overridden by each path_corner)
-target : targetname of first path_corner (starts here)
+/*QUAKED spawnfunc_func_train (0 .5 .8) ?
+Ridable platform, targets spawnfunc_path_corner path to follow.
+speed : speed the train moves (can be overridden by each spawnfunc_path_corner)
+target : targetname of first spawnfunc_path_corner (starts here)
 */
-void() func_train =
+void() spawnfunc_func_train =
 {
 	if (!self.target)
-		objerror("func_train without a target");
+		objerror("spawnfunc_func_train without a target");
 	if (!self.speed)
 		self.speed = 100;
 
@@ -400,7 +400,7 @@
 
 }
 
-/*QUAKED func_rotating (0 .5 .8) ? - - X_AXIS Y_AXIS
+/*QUAKED spawnfunc_func_rotating (0 .5 .8) ? - - X_AXIS Y_AXIS
 Brush model that spins in place on one axis (default Z).
 speed   : speed to rotate (in degrees per second)
 noise   : path/name of looping .wav file to play.
@@ -408,7 +408,7 @@
 dmgtime : See above.
 */
 
-void() func_rotating =
+void() spawnfunc_func_rotating =
 {
 	if (self.noise)
 	{
@@ -470,7 +470,7 @@
 	rotating_blocked();
 }
 
-/*QUAKED func_bobbing (0 .5 .8) ? X_AXIS Y_AXIS
+/*QUAKED spawnfunc_func_bobbing (0 .5 .8) ? X_AXIS Y_AXIS
 Brush model that moves back and forth on one axis (default Z).
 speed : how long one cycle takes in seconds (default 4)
 height : how far the cycle moves (default 32)
@@ -479,7 +479,7 @@
 dmg : Do this mutch dmg every .dmgtime intervall when blocked
 dmgtime : See above.
 */
-void() func_bobbing =
+void() spawnfunc_func_bobbing =
 {
 	local entity controller;
 	if (self.noise)
@@ -628,7 +628,7 @@
 };
 
 
-/*QUAKED func_button (0 .5 .8) ?
+/*QUAKED spawnfunc_func_button (0 .5 .8) ?
 When a button is touched, it moves some distance in the direction of it's angle, triggers all of it's targets, waits some time, then returns to it's original position where it can be triggered again.
 
 "angle"		determines the opening direction
@@ -643,7 +643,7 @@
 2) metallic click
 3) in-out
 */
-void() func_button =
+void() spawnfunc_func_button =
 {
 	SetMovedir ();
 
@@ -1052,7 +1052,7 @@
 };
 
 
-/*QUAKED func_door (0 .5 .8) ? START_OPEN x DOOR_DONT_LINK x x TOGGLE
+/*QUAKED spawnfunc_func_door (0 .5 .8) ? START_OPEN x DOOR_DONT_LINK x x TOGGLE
 if two doors touch, they are assumed to be connected and operate as a unit.
 
 TOGGLE causes the door to wait in both the start and end states for a trigger event.
@@ -1077,7 +1077,7 @@
 
 */
 
-void() func_door =
+void() spawnfunc_func_door =
 {
 	//if (!self.deathtype) // map makers can override this
 	//	self.deathtype = " got in the way";
@@ -1324,7 +1324,7 @@
 };
 
 
-/*QUAKED func_door_secret (0 .5 .8) ? open_once 1st_left 1st_down no_shoot always_shoot
+/*QUAKED spawnfunc_func_door_secret (0 .5 .8) ? open_once 1st_left 1st_down no_shoot always_shoot
 Basic secret door. Slides back, then to the side. Angle determines direction.
 wait  = # of seconds before coming back
 1st_left = 1st move is left of arrow
@@ -1341,7 +1341,7 @@
 3) base
 */
 
-void () func_door_secret =
+void () spawnfunc_func_door_secret =
 {
 	/*if (!self.deathtype) // map makers can override this
 		self.deathtype = " got in the way";*/

Modified: trunk/data/qcsrc/server/t_quake.qc
===================================================================
--- trunk/data/qcsrc/server/t_quake.qc	2008-05-30 08:45:55 UTC (rev 3666)
+++ trunk/data/qcsrc/server/t_quake.qc	2008-06-01 13:23:44 UTC (rev 3667)
@@ -1,18 +1,18 @@
 //***********************
 //QUAKE 1 ENTITIES - So people can play quake1 maps with the nexuiz weapons
 //***********************
-void weapon_nailgun (void) {weapon_electro();}
-void weapon_supernailgun (void) {weapon_hagar();}
-void weapon_supershotgun (void) {weapon_uzi();}
+void spawnfunc_weapon_nailgun (void) {spawnfunc_weapon_electro();}
+void spawnfunc_weapon_supernailgun (void) {spawnfunc_weapon_hagar();}
+void spawnfunc_weapon_supershotgun (void) {spawnfunc_weapon_uzi();}
 
-void item_spikes (void) {item_bullets();}
-//void item_armor1 (void) {item_armor_medium;}  // FIXME: in Quake this is green armor, in Nexuiz maps it is an armor shard
-void item_armor2 (void) {item_armor_large();}
-void item_armorInv (void) {item_armor_large();}
-void item_health (void) {if (self.spawnflags & 2) item_health_mega();else item_health_medium();}
+void spawnfunc_item_spikes (void) {spawnfunc_item_bullets();}
+//void spawnfunc_item_armor1 (void) {spawnfunc_item_armor_medium;}  // FIXME: in Quake this is green armor, in Nexuiz maps it is an armor shard
+void spawnfunc_item_armor2 (void) {spawnfunc_item_armor_large();}
+void item_armorInv (void) {spawnfunc_item_armor_large();}
+void spawnfunc_item_health (void) {if (self.spawnflags & 2) spawnfunc_item_health_mega();else spawnfunc_item_health_medium();}
 
-//item_spikes
-//item_health
+//spawnfunc_item_spikes
+//spawnfunc_item_health
 
 
 
@@ -50,5 +50,7 @@
 	self.attack_finished_for = 0; // why is this even valid? Spiiiiiiiiiiiiiiiiiiiiike!
 	self.notsingle = 0;
 	trace_dphittexturename = "";
+	require_spawnfunc_prefix = 1;
+	self.movetypesteplandevent = SUB_Null;
 }
 

Modified: trunk/data/qcsrc/server/t_quake3.qc
===================================================================
--- trunk/data/qcsrc/server/t_quake3.qc	2008-05-30 08:45:55 UTC (rev 3666)
+++ trunk/data/qcsrc/server/t_quake3.qc	2008-06-01 13:23:44 UTC (rev 3667)
@@ -5,50 +5,50 @@
 // NOTE: for best experience, you need to swap MGs with SGs in the map or it won't have a MG
 
 // SG -> SG
-void spawnfunc_ammo_shells()         { item_shells();        }
+void spawnfunc_ammo_shells()         { spawnfunc_item_shells();        }
                                                  
 // MG -> MG                                      
-void spawnfunc_weapon_machinegun()   { weapon_uzi();         }
-void spawnfunc_ammo_bullets()        { item_bullets();       }
+void spawnfunc_weapon_machinegun()   { spawnfunc_weapon_uzi();         }
+void spawnfunc_ammo_bullets()        { spawnfunc_item_bullets();       }
                                                  
 // GL -> Mortar                                  
-void spawnfunc_ammo_grenades()       { item_rockets();       }
+void spawnfunc_ammo_grenades()       { spawnfunc_item_rockets();       }
                                                  
 // LG -> Electro                                 
-void spawnfunc_weapon_lightning()    { weapon_electro();     }
-void spawnfunc_ammo_lightning()      { item_cells();         }
+void spawnfunc_weapon_lightning()    { spawnfunc_weapon_electro();     }
+void spawnfunc_ammo_lightning()      { spawnfunc_item_cells();         }
                                                  
 // Plasma -> Crylink                             
-void spawnfunc_weapon_plasmagun()    { weapon_crylink();     }
-void spawnfunc_ammo_cells()          { item_cells();         }
+void spawnfunc_weapon_plasmagun()    { spawnfunc_weapon_crylink();     }
+void spawnfunc_ammo_cells()          { spawnfunc_item_cells();         }
                                                  
 // Rail -> Nex                                   
-void spawnfunc_weapon_railgun()      { weapon_nex();         }
-void spawnfunc_ammo_slugs()          { item_cells();         }
+void spawnfunc_weapon_railgun()      { spawnfunc_weapon_nex();         }
+void spawnfunc_ammo_slugs()          { spawnfunc_item_cells();         }
                                                  
 // BFG -> Hagar                                  
-void spawnfunc_weapon_bfg()          { weapon_hagar();       }
-void spawnfunc_ammo_bfg()            { item_cells();         }
+void spawnfunc_weapon_bfg()          { spawnfunc_weapon_hagar();       }
+void spawnfunc_ammo_bfg()            { spawnfunc_item_cells();         }
 
 // RL -> RL
-void spawnfunc_ammo_rockets()        { item_rockets();       }
+void spawnfunc_ammo_rockets()        { spawnfunc_item_rockets();       }
                           
 // Armor                  
-void spawnfunc_item_armor_body()     { item_armor_large();   }
-void spawnfunc_item_armor_combat()   { item_armor_medium();  }
-void spawnfunc_item_armor_shard()    { item_armor_small();   }
-void spawnfunc_item_enviro()         { item_armor_medium();  }
+void spawnfunc_item_armor_body()     { spawnfunc_item_armor_large();   }
+void spawnfunc_item_armor_combat()   { spawnfunc_item_armor_medium();  }
+void spawnfunc_item_armor_shard()    { spawnfunc_item_armor_small();   }
+void spawnfunc_item_enviro()         { spawnfunc_item_armor_medium();  }
 //void spawnfunc_item_flight()       /* not supported */
 //void spawnfunc_item_haste()        /* not supported */
 //void spawnfunc_item_health()       /* handled in t_quake.qc */
-void spawnfunc_item_health_large()   { item_health_large();  }
-void spawnfunc_item_health_small()   { item_health_small();  }
-void spawnfunc_item_health_mega()    { item_health_mega();   }
+//void spawnfunc_item_health_large() /* handled in t_items.qc */
+//void spawnfunc_item_health_small() /* handled in t_items.qc */
+//void spawnfunc_item_health_mega()  /* handled in t_items.qc */
 //void spawnfunc_item_invis()        /* not supported */
 //void spawnfunc_item_regen()        /* not supported */
-void spawnfunc_team_CTF_redflag()    { item_flag_team1();    }
-void spawnfunc_team_CTF_blueflag()   { item_flag_team2();    }
-void spawnfunc_team_CTF_redplayer()  { info_player_team1();  }
-void spawnfunc_team_CTF_blueplayer() { info_player_team2();  }
-void spawnfunc_team_CTF_redspawn()   { info_player_team1();  }
-void spawnfunc_team_CTF_bluespawn()  { info_player_team2();  }
+void spawnfunc_team_CTF_redflag()    { spawnfunc_item_flag_team1();    }
+void spawnfunc_team_CTF_blueflag()   { spawnfunc_item_flag_team2();    }
+void spawnfunc_team_CTF_redplayer()  { spawnfunc_info_player_team1();  }
+void spawnfunc_team_CTF_blueplayer() { spawnfunc_info_player_team2();  }
+void spawnfunc_team_CTF_redspawn()   { spawnfunc_info_player_team1();  }
+void spawnfunc_team_CTF_bluespawn()  { spawnfunc_info_player_team2();  }

Modified: trunk/data/qcsrc/server/t_swamp.qc
===================================================================
--- trunk/data/qcsrc/server/t_swamp.qc	2008-05-30 08:45:55 UTC (rev 3666)
+++ trunk/data/qcsrc/server/t_swamp.qc	2008-06-01 13:23:44 UTC (rev 3667)
@@ -1,6 +1,6 @@
 /*
 *		t_swamp.c
-*		Adds trigger_swamp and suppoart routines for nexuiz 1.2.1+
+*		Adds spawnfunc_trigger_swamp and suppoart routines for nexuiz 1.2.1+
 *		Author tZork (Jakob MG) 
 *		jakob at games43.se
 *		2005 11 29
@@ -11,14 +11,14 @@
 .float swamp_ticker;	//Used localy by the swampslug to calculate when to hurt the player and check the slug.
 .entity swampslug;
 
-void trigger_swamp(void);
+void spawnfunc_trigger_swamp(void);
 void swamp_touch(void);
 void swampslug_think();
 
 
 /*
 * Uses a entity calld swampslug to handle players in the swamp
-* It works like this: When the plyer enters teh swamp the trigger_swamp
+* It works like this: When the plyer enters teh swamp the spawnfunc_trigger_swamp
 * attaches a new "swampslug" to the player. As long as the plyer is inside
 * the swamp the swamp gives the slug new health. But the slug slowly kills itself
 * so when the player goes outside the swamp, it dies and releases the player from the 
@@ -84,11 +84,11 @@
 	other.swampslug.health = 2;
 }
 
-/*QUAKED trigger_swamp (.5 .5 .5) ?
+/*QUAKED spawnfunc_trigger_swamp (.5 .5 .5) ?
 Players gettin into the swamp will 
 get slowd down and damaged
 */
-void trigger_swamp(void)
+void spawnfunc_trigger_swamp(void)
 {
 	// Init stuff
 	InitTrigger ();

Modified: trunk/data/qcsrc/server/t_teleporters.qc
===================================================================
--- trunk/data/qcsrc/server/t_teleporters.qc	2008-05-30 08:45:55 UTC (rev 3666)
+++ trunk/data/qcsrc/server/t_teleporters.qc	2008-06-01 13:23:44 UTC (rev 3667)
@@ -122,7 +122,7 @@
 	}
 }
 
-void info_teleport_destination (void)
+void spawnfunc_info_teleport_destination (void)
 {
 	self.mangle = self.angles;
 	self.angles = '0 0 0';
@@ -134,14 +134,14 @@
 		objerror ("Teleport destination without a targetname");
 }
 
-void misc_teleporter_dest (void)
+void spawnfunc_misc_teleporter_dest (void)
 {
-	info_teleport_destination();
+	spawnfunc_info_teleport_destination();
 }
 
-void target_teleporter (void)
+void spawnfunc_target_teleporter (void)
 {
-	info_teleport_destination();
+	spawnfunc_info_teleport_destination();
 }
 
 void teleport_findtarget (void)
@@ -161,7 +161,7 @@
 	waypoint_spawnforteleporter(self, self.dest, 0);
 }
 
-void trigger_teleport (void)
+void spawnfunc_trigger_teleport (void)
 {
 	self.angles = '0 0 0';
 

Modified: trunk/data/qcsrc/server/teamplay.qc
===================================================================
--- trunk/data/qcsrc/server/teamplay.qc	2008-05-30 08:45:55 UTC (rev 3666)
+++ trunk/data/qcsrc/server/teamplay.qc	2008-06-01 13:23:44 UTC (rev 3667)
@@ -569,7 +569,7 @@
 	// onslaught is special
 	if(g_onslaught)
 	{
-		head = findchain(classname, "onslaught_generator");
+		head = findchain(classname, "spawnfunc_onslaught_generator");
 		while (head)
 		{
 			if (head.team == COLOR_TEAM1) c1 = 0;
@@ -582,9 +582,9 @@
 	}
 
 	if(g_domination)
-		teament_name = "dom_team";
+		teament_name = "spawnfunc_dom_team";
 	else if(g_ctf)
-		teament_name = "ctf_team";
+		teament_name = "spawnfunc_ctf_team";
 	else if(g_tdm)
 		teament_name = "tdm_team";
 	else if(g_assault)

Modified: trunk/data/qcsrc/server/w_rocketlauncher.qc
===================================================================
--- trunk/data/qcsrc/server/w_rocketlauncher.qc	2008-05-30 08:45:55 UTC (rev 3666)
+++ trunk/data/qcsrc/server/w_rocketlauncher.qc	2008-06-01 13:23:44 UTC (rev 3667)
@@ -358,7 +358,7 @@
 				}else{
 					local float distance; distance= bound(300,vlen(self.origin-self.enemy.origin),30000);
 					//As the distance gets larger, a correct detonation gets near imposible
-					//Bots are assumed to use the rocket light to see if the rocket gets near a player
+					//Bots are assumed to use the rocket spawnfunc_light to see if the rocket gets near a player
 					if(v_forward * normalize(missile.origin - self.enemy.origin)< 0.1)
 						if(self.enemy.classname == "player")
 							if(desirabledamage >= 0.1*coredamage)

Modified: trunk/data/qcsrc/server/waypointsprites.qc
===================================================================
--- trunk/data/qcsrc/server/waypointsprites.qc	2008-05-30 08:45:55 UTC (rev 3666)
+++ trunk/data/qcsrc/server/waypointsprites.qc	2008-06-01 13:23:44 UTC (rev 3667)
@@ -52,7 +52,7 @@
 	precache_model("models/sprites/here.sp2");
 	precache_model("models/sprites/helpme.sp2");
 	precache_model("models/sprites/redbase.sp2");
-	precache_model("models/sprites/waypoint.sp2");
+	precache_model("models/sprites/spawnfunc_waypoint.sp2");
 	precache_model("models/sprites/danger.sp2");
 }
 
@@ -96,7 +96,7 @@
 		}
 		else if(fadetime < (wp.teleport_time - time))
 		{
-			// accelerate the waypoint's dying
+			// accelerate the spawnfunc_waypoint's dying
 			// ensure:
 			//   (wp.teleport_time - time) / wp.health stays
 			//   wp.teleport_time = time + fadetime
@@ -248,7 +248,7 @@
 	if(spr != "")
 		setmodel(wp, strcat("models/sprites/", spr, ".sp2")); // precision set above
 	else
-		wp.model = "waypoint";
+		wp.model = "spawnfunc_waypoint";
 	setsize(wp, '0 0 0', '0 0 0');
 	wp.waypointsprite_for_player = waypointsprite_for_player_default;
 	return wp;




More information about the nexuiz-commits mailing list