|
|
|
@ -1837,6 +1837,8 @@ void CBaseTrigger::TeleportTouch( CBaseEntity *pOther )
@@ -1837,6 +1837,8 @@ void CBaseTrigger::TeleportTouch( CBaseEntity *pOther )
|
|
|
|
|
entvars_t *pevToucher = pOther->pev; |
|
|
|
|
edict_t *pentTarget = NULL; |
|
|
|
|
|
|
|
|
|
if( !(pev->spawnflags & SF_TRIGGER_TELEPORTALL) ) |
|
|
|
|
{ |
|
|
|
|
// Only teleport monsters or clients
|
|
|
|
|
if( !FBitSet( pevToucher->flags, FL_CLIENT | FL_MONSTER ) ) |
|
|
|
|
return; |
|
|
|
@ -1861,6 +1863,14 @@ void CBaseTrigger::TeleportTouch( CBaseEntity *pOther )
@@ -1861,6 +1863,14 @@ void CBaseTrigger::TeleportTouch( CBaseEntity *pOther )
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
if( pOther->IsBSPModel() ) |
|
|
|
|
return; |
|
|
|
|
if(pOther == this) |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
pentTarget = FIND_ENTITY_BY_TARGETNAME( pentTarget, STRING( pev->target ) ); |
|
|
|
|
if( FNullEnt( pentTarget ) ) |
|
|
|
@ -1878,7 +1888,9 @@ void CBaseTrigger::TeleportTouch( CBaseEntity *pOther )
@@ -1878,7 +1888,9 @@ void CBaseTrigger::TeleportTouch( CBaseEntity *pOther )
|
|
|
|
|
pevToucher->flags &= ~FL_ONGROUND; |
|
|
|
|
|
|
|
|
|
UTIL_SetOrigin( pevToucher, tmp ); |
|
|
|
|
|
|
|
|
|
if( pev->spawnflags & SF_TRIGGER_PORTAL ) |
|
|
|
|
pevToucher->angles = pevToucher->angles + pentTarget->v.angles; |
|
|
|
|
else |
|
|
|
|
pevToucher->angles = pentTarget->v.angles; |
|
|
|
|
|
|
|
|
|
if( pOther->IsPlayer() ) |
|
|
|
@ -1887,6 +1899,7 @@ void CBaseTrigger::TeleportTouch( CBaseEntity *pOther )
@@ -1887,6 +1899,7 @@ void CBaseTrigger::TeleportTouch( CBaseEntity *pOther )
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
pevToucher->fixangle = TRUE; |
|
|
|
|
if( !( pev->spawnflags & SF_TRIGGER_PORTAL ) ) |
|
|
|
|
pevToucher->velocity = pevToucher->basevelocity = g_vecZero; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|