trigger_teleport: respect the 'master' value, support for spawnflags 1 and 2.
This commit is contained in:
parent
4fe5166fd1
commit
a3ade0deab
1 changed files with 13 additions and 0 deletions
|
@ -22,6 +22,12 @@ Teleportation volume. Teleports anything it touches to the position of
|
|||
any entity set as the "target". Works best with info_teleport_destination.
|
||||
*/
|
||||
|
||||
enumflags
|
||||
{
|
||||
TRIGTELE_MONSTERS,
|
||||
TRIGTELE_NOCLIENTS
|
||||
};
|
||||
|
||||
class trigger_teleport:CBaseTrigger
|
||||
{
|
||||
void(void) trigger_teleport;
|
||||
|
@ -32,6 +38,13 @@ class trigger_teleport:CBaseTrigger
|
|||
void
|
||||
trigger_teleport::touch(void)
|
||||
{
|
||||
if (GetMaster() == FALSE)
|
||||
return;
|
||||
if (spawnflags & TRIGTELE_NOCLIENTS && other.flags & FL_CLIENT)
|
||||
return;
|
||||
if (spawnflags & TRIGTELE_MONSTERS && !(other.flags & FL_MONSTER))
|
||||
return;
|
||||
|
||||
if (other.health > 0 || other.solid == SOLID_SLIDEBOX) {
|
||||
eActivator = other;
|
||||
entity eTarget = find(world, CBaseTrigger::m_strTargetName, m_strTarget);
|
||||
|
|
Loading…
Reference in a new issue