X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Ftriggers%2Ftarget%2Fspawn.qc;h=96c266f6cc57315e2436e3f752321b83405a5ab8;hb=692cb758fe8f25fa078bfd5885333ee031885600;hp=554d382268869f79e413bc27112bb42a8d76c6d6;hpb=541c234fd442f5857209128fc7a907e406f4be03;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/triggers/target/spawn.qc b/qcsrc/common/triggers/target/spawn.qc index 554d38226..96c266f6c 100644 --- a/qcsrc/common/triggers/target/spawn.qc +++ b/qcsrc/common/triggers/target/spawn.qc @@ -1,9 +1,8 @@ #if defined(CSQC) #elif defined(MENUQC) #elif defined(SVQC) - #include "../../../server/_all.qh" - #include "../../util.qh" - #include "../../../server/defs.qh" + #include + #include #endif #ifdef SVQC @@ -16,7 +15,7 @@ // 2 = trigger on map load float target_spawn_initialized; -.void() target_spawn_spawnfunc; +.void(entity this) target_spawn_spawnfunc; float target_spawn_spawnfunc_field; .entity target_spawn_activator; .float target_spawn_id; @@ -158,7 +157,7 @@ void target_spawn_edit_entity(entity e, string msg, entity kt, entity t2, entity if(valuefield == "") { if(value == "") - value = ftos(num_for_edict(valueent)); + value = ftos(etof(valueent)); } else { @@ -222,7 +221,7 @@ void target_spawn_edit_entity(entity e, string msg, entity kt, entity t2, entity oldactivator = activator; activator = act; - WITH(entity, self, e, e.target_spawn_spawnfunc()); + WITH(entity, self, e, e.target_spawn_spawnfunc(e)); activator = oldactivator; // We called an external function, so we have to re-tokenize msg. @@ -280,6 +279,7 @@ void target_spawn_use() if(!target_spawn_cancreate()) return; e = spawn(); + e.spawnfunc_checked = true; target_spawn_useon(e); e.target_spawn_id = self.target_spawn_id; }