r5626 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Thu Jan 22 03:20:36 EST 2009


Author: div0
Date: 2009-01-22 03:20:15 -0500 (Thu, 22 Jan 2009)
New Revision: 5626

Modified:
   trunk/data/qcsrc/server/extensions.qh
Log:
DP_SV_ONENTITYPREPOSTSPAWNFUNCTION - hooks before and after spawning an entity from a map/ent


Modified: trunk/data/qcsrc/server/extensions.qh
===================================================================
--- trunk/data/qcsrc/server/extensions.qh	2009-01-22 08:15:16 UTC (rev 5625)
+++ trunk/data/qcsrc/server/extensions.qh	2009-01-22 08:20:15 UTC (rev 5626)
@@ -1174,6 +1174,18 @@
 // You may as such dictate the behavior as to what happens to the entity.
 // To mimic the engine's default behavior, simply call remove(self).
 
+//DP_SV_ONENTITYPREPOSTSPAWNFUNCTION
+//idea: div0
+//darkplaces implementation: div0
+//engine-called QC prototypes:
+//void() SV_OnEntityPreSpawnFunction;
+//void() SV_OnEntityPostSpawnFunction;
+//description:
+// These functions are called BEFORE or AFTER an entity is spawned the regular way.
+// You may as such dictate the behavior as to what happens to the entity.
+// SV_OnEntityPreSpawnFunction is called before even looking for the spawn function, so you can even change its classname in there. If it remove()s the entity, the spawn function will not be looked for.
+// SV_OnEntityPostSpawnFunction is called ONLY after its spawn function or SV_OnEntityNoSpawnFunction was called, and skipped if the entity got removed by either.
+
 //DP_SV_MODELFLAGS_AS_EFFECTS
 //idea: LordHavoc, Dresk
 //darkplaces implementation: LordHavoc




More information about the nexuiz-commits mailing list