When you try to walk thru the teleport it just plays the water sound, BUT if u rj to the top center edge it triggers a teleport back to itself so u spawn nearby, same room.
So this will fix that.
But the player just needs to know to rj on top of the teleporter,,,
In triggers.qc
find
Code: Select all
void() teleport_touch =
Code: Select all
entity(string cname) SelectSpawnPoint;
Code: Select all
//-----[Hacks for broken teleporters in deathmatch 1 mode]---------<<<<
if ((world.model == "maps/e2m6.bsp") && (other.origin_z < -827))
t = SelectSpawnPoint("info_player_deathmatch");
if ((world.model == "maps/e1m7.bsp") && (other.origin_z < -827))
t = SelectSpawnPoint("info_player_deathmatch");
//--------------------------end
above this line...same function.
Code: Select all
setorigin (other, t.origin);
other.angles = t.mangle;
in client.qc define
as
Code: Select all
/*
============
SelectSpawnPoint
Returns the entity to spawn at
============
*/
entity(string cname) SelectSpawnPoint =
{
local entity spot, e;
local float f, n;
spot = lastspawn;
// counter bumped in void() info_player_deathmatch =
n = dm_spawns;
if (n < 1)//at least do once
n = 1;
while (n)
{
spot = find(spot, classname, cname);
f = 0;
n = n - 1;
if (spot != world)
{
if (spot != self.trigger_field)
{
e = findradius (spot.origin, 32);
while (e)
{
if ((e.classname == "player") && (e != self))
{
e = world;
f = 1;
}
else
{
e = e.chain;
}
}
}
else
{
f = 1;
}
if (f == 0)
{
lastspawn = spot;
return (spot);
}
}
}
return (lastspawn);
};