#include <common/triggers/target/location.qc>
#include <common/triggers/target/music.qc>
#include <common/triggers/target/spawn.qc>
+#include <common/triggers/target/spawnpoint.qc>
#include <common/triggers/target/speaker.qc>
#include <common/triggers/target/voicescript.qc>
#include <common/triggers/target/location.qh>
#include <common/triggers/target/music.qh>
#include <common/triggers/target/spawn.qh>
+#include <common/triggers/target/spawnpoint.qh>
#include <common/triggers/target/speaker.qh>
#include <common/triggers/target/voicescript.qh>
#include "location.qc"
#include "music.qc"
#include "spawn.qc"
+#include "spawnpoint.qc"
#include "speaker.qc"
#include "voicescript.qc"
--- /dev/null
+#include "spawnpoint.qh"
+
+#ifdef SVQC
+void target_spawnpoint_use(entity this, entity actor, entity trigger)
+{
+ if(this.active != ACTIVE_ACTIVE)
+ return;
+
+ actor.spawnpoint_targ = this;
+}
+
+void target_spawnpoint_reset(entity this)
+{
+ this.active = ACTIVE_ACTIVE;
+}
+
+// TODO: persistent spawnflag?
+spawnfunc(target_spawnpoint)
+{
+ this.active = ACTIVE_ACTIVE;
+ this.use = target_spawnpoint_use;
+ this.reset = target_spawnpoint_reset;
+}
+#endif
--- /dev/null
+#pragma once
+
+#ifdef SVQC
+.entity spawnpoint_targ;
+#endif
#include "../common/triggers/func/conveyor.qh"
#include "../common/triggers/teleporters.qh"
+#include "../common/triggers/target/spawnpoint.qh"
#include "../common/vehicles/all.qh"
this.viewloc = NULL;
+ //this.spawnpoint_targ = NULL; // keep it so they can return to where they were?
+
this.weaponmodel = "";
for (int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
{
this.viewloc = NULL;
+ this.spawnpoint_targ = NULL;
+
this.crouch = false;
this.view_ofs = STAT(PL_VIEW_OFS, this);
setsize(this, STAT(PL_MIN, this), STAT(PL_MAX, this));
if (spot)
return spot;
+ if(this.spawnpoint_targ)
+ return this.spawnpoint_targ;
+
if(anypoint || autocvar_g_spawn_useallspawns)
teamcheck = -1;
else if(have_team_spawns > 0)