#if defined(CSQC)
#elif defined(MENUQC)
#elif defined(SVQC)
- #include "../../../server/_all.qh"
- #include "../../util.qh"
- #include "../../../server/defs.qh"
+ #include <common/util.qh>
+ #include <server/defs.qh>
#endif
#ifdef SVQC
// 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;
void target_spawn_helper_setmodel()
{SELFPARAM();
- setmodel(self, self.model);
+ _setmodel(self, self.model);
}
void target_spawn_helper_setsize()
if(valuefield == "")
{
if(value == "")
- value = ftos(num_for_edict(valueent));
+ value = ftos(etof(valueent));
}
else
{
oldactivator = activator;
activator = act;
- SELFCALL(e, e.target_spawn_spawnfunc());
- SELFCALL_DONE();
+ WITH(entity, self, e, e.target_spawn_spawnfunc(e));
activator = oldactivator;
// We called an external function, so we have to re-tokenize msg.
if(!target_spawn_cancreate())
return;
e = spawn();
+ e.spawnfunc_checked = true;
target_spawn_useon(e);
e.target_spawn_id = self.target_spawn_id;
}
}
}
-void spawnfunc_target_spawn()
-{SELFPARAM();
+spawnfunc(target_spawn)
+{
initialize_field_db();
self.use = target_spawn_use;
self.message = strzone(strreplace("'", "\"", self.message));